[SOLVED] VirtualBox: USB device "is being exclusively used by the host computer"
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
VirtualBox: USB device "is being exclusively used by the host computer"
Hello
This summarises a virtualbox.org forums thread in which the question has become more about the host than VirtualBox.
A "USB devices greyed out" problem has come down to this:
Code:
c@CW8:~$ VBoxManage controlvm "WXP" usbattach d9d550c5-fe6c-49dc-8bec-83ea60978a7c
[snip]
ERROR: USB device 'SanDisk Cruzer Blade' with UUID {[snip]} is being exclusively used by the host computer
[snip]
The problem is affecting all available devices -- 2 x thumb drives, 1 Bluetooth adapter and a printer -- so I don't think it is driver-specific.
From the host side, what can I do to investigate what might be making the devices unavailable for VirtualBox?
Netsearching suggests this is an unusual problem; chances are there's something unusual about my system that is triggering it. The only thing I can think of is that I changed the vboxusers group's GID (after which I uninstalled VirtualBox, groupdeleted vboxusers, groupadded vboxusers, installed VirtualBox ...
Versions: VirtualBox 3.1.6 on Slackware 13.0 32-bit.
My intuition is that this is a udev problem, created by the group change but I've scanned all the rules (under /lib/udev and /etc/udev) and found nothing relevant.
it may be an udev rule as suspected but as I do not use your distro I will comment in general.
The more user friendly your desktop....the greater the chance that your usb devices HAVE been automounted.
I suggest you use your file manager and look to see if (with root powers)
where are usb devices mounted.....or use normal file manager and look firstly into folders
/mnt
/media
Also peek into your /etc/fstab in case its not an udev rule but an fstab that is mounting your device.
If your distro is that friendly...you should be able to right hand click the mounted icon...folder...and Unmount it.
2) if your log shows usb device is say...../dev/usb3....something
try a root command to umount it or run a fuser against it.
3) Then of course...vbox and usb only play if you are using the non-free edition but I suspect you already knew that?
could you expand a little on how you are accessing root and the usb thumb drive/hard drive please?
Do you do it routinely as well?
I have never tested the reported UUID in vbox for a user versus root so will have to have a look myself but I am wondering if its your process?
To me....try insert stick into host slot
do not mount it in host
click on vbxo devices ....check box for usb device
mount it inside vbox for user
umount of user
----
do same process for root but mount for root
--------------
I will get around to it.....but I am wondering IF it reports different UUID...the error is in vbox as UUID is always supposed to be same unless you change the partitioning.
could you expand a little on how you are accessing root and the usb thumb drive/hard drive please?
Thanks aus9
I don't understand the question but will answer in detail hoping to provide the information you want ... Desktop is Xfce. Terminal emulator is mrxvt. Command line is /usr/bin/mrxvt -name root -ic /home/c/d/Repository/Icons/format-text-bold.xpm. Then enter root password and have root command prompt.
If I want to browse the FAT file system on the thumb drive on Linux (Slackware 13.0), I open Xfce's file manager, Thunar, and find it listed but greyed out. At this point it is not mounted. When I double click its icon it is mounted. To unmount it, I right click its icon and choose "Unmount Volume".
That's FYI -- I haven't been doing that after host boot and before trying to attach the thumb drive to a VirtualBox VM.
Once at a root command prompt, for testing purposes only (repeated while writing this post)
No, I normally use only the VM's host window's Devices menu to attach USB devices. I did not know of VBoxManage list usbhost until investigating this problem.
Quote:
Originally Posted by aus9
I have never tested the reported UUID in vbox for a user versus root so will have to have a look myself but I am wondering if its your process?
To me....try insert stick into host slot
do not mount it in host
click on vbxo devices ....check box for usb device
mount it inside vbox for user
umount of user
A valid "wonder". That's exactly what I normally do, assuming "click on vbxo devices" can be expanded to "Start a VM (not full screen). On the host window for the VM, open the Devices menu ...". The problem is that all the USB devices are greyed out so it is not possible to "check box for usb device"
Quote:
Originally Posted by aus9
do same process for root but mount for root
I cannot do the same for root because root is not a GUI user (trying to start a GUI application in a terminal as above results in cannot connect to X server
Quote:
Originally Posted by aus9
I will get around to it.....but I am wondering IF it reports different UUID...the error is in vbox as UUID is always supposed to be same unless you change the partitioning.
I don't think the UUID reported by VBoxManage list usbhost is the same as the partition UUID. I just tested again as user c (the usual VirtualBox user, member of vboxusers etc.). Collating results from the virtualbox.org forums thread and while writing this post, it looks as if VirtualBox creates these UUIDs for itself and on-the-fly:
Code:
UUID for c: 1f307a8a-2ecc-4a8d-9630-eebe225137dd
29 March: d9d550c5-fe6c-49dc-8bec-83ea60978a7c
UUID for root: b176c47d-0d2c-4fe2-97de-f8bbc5c64d0a
29 March: 174e0a69-af28-4e32-b1a5-94ae8e94b005
To determine the thumb drive's partition's UUID, I searched for /dev files containing its serial number to get its /dev/sd<letter><number> and then searched for a link to that in /dev/disk/by-uuid
That should not be and was not necessary on Slackware 13.0. As the VirtaulBox 3.1.6 User Manual says "If USB is not working on your Linux host, make sure that the current user is a member of the vboxusers group. On older hosts ...". "older hosts" is not defined but I guess they are ones on which VirtualBox cannot use the udev rules mechanism like this /etc/dev/rules.d/10-vboxdrv.rules on my system
which uses the more generic plugdev group rather than vboxusers -- a neater solution because it is not only VirtualBox users who may want read and write access to file systems on USB devices.
BTW the VirtualBox user, "c", is a member of plugdev.
I'll leave this thread not SOLVED for a while because this is a workaround not a proper solution.
Last edited by catkin; 04-03-2010 at 01:11 AM.
Reason: Title change
VBoxManage list usbhost
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
Host USB Devices:
UUID: 49d59d0e-761a-46fb-b92f-00c435508461
VendorId: 0x0930 (0930)
ProductId: 0x6529 (6529)
Revision: 1.0 (0100)
Manufacturer: TOSHIBA
Product: TransMemory
SerialNumber: 09F08951425159F9
Address: sysfs:/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8//device:/dev/bus/usb/001/005
Current State: Busy
ok so I used apt-get install with no complaints to get to part 2.
I then used my smxi script....only for smart ppl using Debian style sorry
...guru has a smvi script if you just want to add vbox or vmware
and it found I was missing some dependencies ....EDIT libidl0 I mis-spelt using fuzzy eyesight.....libid L for lima zero at end
libidl0
libqtcore4
libqtgui4
having prevously resolved other dependencies in part 2
so me thinks.....IMHO the solution is to move to a Debian system.
smxi is used to update your system...clean up stuff...tweak and put out the rubbish and night....send cards before birthday is expired etc
ok this is weird but exciting....I mounted usb stick in host
I clicked in devices and mounted usb in vbox
....host no longer shows it
I can't show you a snapshot that is true evidence of this...you just have to trust me.
I have never tested this for a long long time.....when I discovered vbox I knew I had to always umount the host....so this must be more recent development but highly appreciated
I mounted usb stick in host
I clicked in devices and mounted usb in vbox
....host no longer shows it
I have never tested this for a long long time.....when I discovered vbox I knew I had to always umount the host....so this must be more recent development but highly appreciated
Hello aus
Where does "host no longer shows it"?
VirtualBox has got more convenient and more intuitive with each new release. They really work on making it more usable.
If its mounted in host.....usb stick shows in my file manager....I use LXDE so thats pcmanfm....but I guess the same would be true of other good managers.
Now when I mount it using vbox device manager...the "mounted" folder on host file manager now disappears is what I meant by ...host no longer shows it
If its mounted in host.....usb stick shows in my file manager....I use LXDE so thats pcmanfm....but I guess the same would be true of other good managers.
Now when I mount it using vbox device manager...the "mounted" folder on host file manager now disappears is what I meant by ...host no longer shows it
Same using Xfce's file manager, Thunar, except Thunar does not mount the device until you open it; it's greyed out until then. That makes sense -- it minimises the risk of file system damage caused by unplugging a mounted device while causing minimal user inconvenience (the mounting delay is imperceptible to the user).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.