| Linux - Virtualization and Cloud This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
03-29-2010, 06:00 AM
|
#1
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
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.
|
|
|
|
03-29-2010, 05:20 PM
|
#2
|
|
Senior Member
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 2 / CrunchBang Linux 10 Statler / Easy Peasy
Posts: 4,287
|
There's a script here: VirtualBox Test Script that checks your VirtualBox setup.
|
|
|
|
03-29-2010, 06:35 PM
|
#3
|
|
Senior Member
Registered: Oct 2003
Location: Australia
Posts: 4,424
Rep: 
|
hi
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?
|
|
|
|
03-29-2010, 11:42 PM
|
#4
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
Original Poster
|
Quote:
Originally Posted by {BBI}Nexus{BBI}
|
Thanks {BBI}Nexus{BBI}  I wrote it!
|
|
|
|
03-29-2010, 11:44 PM
|
#5
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
Original Poster
|
Thanks aus9
It's not mounted ...
|
|
|
|
03-30-2010, 06:24 PM
|
#6
|
|
Senior Member
Registered: Oct 2003
Location: Australia
Posts: 4,424
Rep: 
|
hi
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.
|
|
|
|
03-31-2010, 01:06 AM
|
#7
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
Original Poster
|
Quote:
Originally Posted by aus9
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)
Code:
root@CW8:~# /opt/VirtualBox/VBoxManage list usbhost
[snip]
UUID: b176c47d-0d2c-4fe2-97de-f8bbc5c64d0a
VendorId: 0x0781 (0781)
ProductId: 0x5567 (5567)
Revision: 2.0 (0200)
Manufacturer: SanDisk
Product: Cruzer Blade
SerialNumber: 1536401B4C138AB9
Address: /proc/bus/usb/001/004
Current State: Busy
[snip]
And, as evidence it is not mounted, firstly when mounted by Thunar as above and then after "Unmount Volume" in Thunar
Code:
root@CW8:~# df -hT | grep CHARLES8GB
/dev/sdc1 vfat 7.5G 132K 7.5G 1% /media/CHARLES8GB
root@CW8:~# df -hT | grep CHARLES8GB
[no output]
Quote:
Originally Posted by aus9
Do you do it routinely as well?
|
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
Code:
root@CW8:~# find /dev -iname '*1536401B4C138AB9*' -exec ls -l {} \;
lrwxrwxrwx 1 root root 10 2010-03-31 10:26 /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_1536401B4C138AB9-0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 2010-03-31 10:26 /dev/disk/by-id[snip]
root@CW8:~# find /dev/disk/by-uuid -lname '*sdc1*' -exec ls -l {} \;
lrwxrwxrwx 1 root root 10 2010-03-31 10:26 /dev/disk/by-uuid/4BA8-ADEB -> ../../sdc1
Ah! Of course! It is a VFAT file system and that's what their UUIDs look like.
|
|
|
|
03-31-2010, 02:20 AM
|
#8
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
Original Poster
|
Workaround
I found a workaround for the problem by adding a line to fstab
Code:
none /proc/bus/usb usbfs devgid=765,devmode=664 0 0
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
Code:
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vboxusers", MODE="0664"
Maybe that is not effective for a thumb drive anyway because it would (?) be superseded by this excerpt from /lib/udev/rules.d/65-permissions.rules
Code:
KERNEL=="sd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev"
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
|
|
|
|
03-31-2010, 06:48 PM
|
#9
|
|
Senior Member
Registered: Oct 2003
Location: Australia
Posts: 4,424
Rep: 
|
hi
yes that pesky vfat system gets you every time...well done
anyhow I made a kinda promise so here is part one stuff
--------------------
in host....usb mounted
Code:
df -hT | grep vfat
/dev/sdb1 vfat 488M 3.3M 485M 1% /media/disk
umounted returns null as expected
in host......usb NOT mounted
Code:
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
using root powers usb NOT mounted
Code:
blkid | grep vfat
/dev/sdb1: LABEL="" UUID="8CC9-F420" TYPE="vfat"
My inference.....lets not get fixated on UUID with vfat
|
|
|
|
03-31-2010, 07:11 PM
|
#10
|
|
Senior Member
Registered: Oct 2003
Location: Australia
Posts: 4,424
Rep: 
|
part 2
I just did a rebuild and damn....I can't do the test!
mine is greyed out and clicking into box no good
by hovering...it seems usb is unavailable.
maybe its borked?

|
|
|
|
03-31-2010, 07:35 PM
|
#11
|
|
Senior Member
Registered: Oct 2003
Location: Australia
Posts: 4,424
Rep: 
|
part 3
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
good luck
http://i44.tinypic.com/iym0b7.jpg
Last edited by aus9; 03-31-2010 at 07:51 PM.
Reason: correct eyes for libidl0
|
|
|
|
03-31-2010, 07:47 PM
|
#12
|
|
Senior Member
Registered: Oct 2003
Location: Australia
Posts: 4,424
Rep: 
|
part 4
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
|
|
|
|
04-01-2010, 11:55 PM
|
#13
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
Original Poster
|
Quote:
Originally Posted by aus9
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.
|
|
|
|
04-02-2010, 06:57 PM
|
#14
|
|
Senior Member
Registered: Oct 2003
Location: Australia
Posts: 4,424
Rep: 
|
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
|
|
|
|
04-03-2010, 12:00 AM
|
#15
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
Original Poster
|
Quote:
Originally Posted by aus9
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).
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:56 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|