Page 1 of 2

VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 28. Jul 2010, 19:35
by wbeebe
Host OS: RHEL 5.5 Workstation x86-64 (Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux)
Host Machine: Dell 690 with one quad-core E-5345 Xeon, 32GB DRAM.
VirtualBox Version: 3.2.6 r63112 commercial version (not OSE)
VB Guests OSs: CentOS 5.4 x86-64, Fedora 13 x86-64, Linux Mint 9 x86-64, RHEL 5.5 Workstation x86-64, Ubuntu 10.04 x86-64

The obvious:
The host user under which VirtualBox is installed and executed is a member of vboxusers group.
Enable USB Controller is checked on all installed VMs.
Enable USB 2.0 (EHCI) Controller is checked.
USB Device filters are added and enabled for all virtual machines.
USB Devices enabled:
SanDisk Cruzer [0200]
SCN Micrososystems Inc. SCR3310 USB Smart Card Reader [0518]

VirtualBox is working flawlessly (network, shared folders, general execution) except for USB. When a virtual machine is running, right clicking on the USB icon on the lower right edge pops up a list showing every USB device attached to the host, but they are all greyed out.

Following a suggestion on another thread, I added the following to host's /etc/fstab:
none /proc/bus/usb usbfs devgid=500,devmode=666 0 0

but it has no effect enabling guest USB.

Grepping the log file of a given VM (CentOS 5.4, for example) for USB produces the following:
[user@host]$ grep -i usb VBox.log
00:00:00.459 [/Devices/usb-ehci/] (level 2)
00:00:00.459 [/Devices/usb-ehci/0/] (level 3)
00:00:00.459 [/Devices/usb-ehci/0/Config/] (level 4)
00:00:00.459 [/Devices/usb-ehci/0/LUN#0/] (level 4)
00:00:00.459 Driver <string> = "VUSBRootHub" (cb=12)
00:00:00.459 [/Devices/usb-ehci/0/LUN#0/Config/] (level 5)
00:00:00.459 [/Devices/usb-ehci/0/LUN#999/] (level 4)
00:00:00.459 [/Devices/usb-ehci/0/LUN#999/Config/] (level 5)
00:00:00.459 [/Devices/usb-ohci/] (level 2)
00:00:00.459 [/Devices/usb-ohci/0/] (level 3)
00:00:00.459 [/Devices/usb-ohci/0/Config/] (level 4)
00:00:00.459 [/Devices/usb-ohci/0/LUN#0/] (level 4)
00:00:00.459 Driver <string> = "VUSBRootHub" (cb=12)
00:00:00.459 [/Devices/usb-ohci/0/LUN#0/Config/] (level 5)
00:00:00.459 [/Devices/usb-ohci/0/LUN#999/] (level 4)
00:00:00.459 [/Devices/usb-ohci/0/LUN#999/Config/] (level 5)
00:00:00.459 [/USB/] (level 1)
00:00:00.459 [/USB/USBProxy/] (level 2)
00:00:00.459 [/USB/USBProxy/GlobalConfig/] (level 3)
00:00:12.994 EHCI: USB Operational
00:00:13.164 OHCI: USB Operational
00:00:13.519 OHCI: USB Suspended

What do I need to do in order to enable USB usage in 64-bit guests running under VirtualBox on a 64-bit RHEL 5 host?

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 29. Jul 2010, 23:56
by dmikulec
I was having the same problem with Vbox on Ubuntu. I added my name to the groups vboxusers and lp. Printing now works. Hope this works for you.

Regards,

Don

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 15:17
by wbeebe
I appreciate the response, Don, but as I noted before, the user is a part of vboxusers group. Unfortunately the distribution I'm having problems with is RHEL Workstation 5.5, and I'm just trying to get host USB to work.

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 15:40
by Perryg
USB is a one-to-one connection meaning that if something requires it it is released for the location it was attached. If you are running several guests with filters set that might confuse the VB code. Try with the enabled check marks and no filter, or add a blank filter instead of an actual filter and then see if selecting it in the guest works.
It might help to post the results of VBoxManage list usbhost

Several checks are included in Chapter 12.6.7. USB not working of your VirtualBox users guide

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 17:37
by wbeebe
If you are running several guests with filters set that might confuse the VB code.
I've been only running one guest at a time while trying to debug this.
Try with the enabled check marks and no filter, or add a blank filter instead of an actual filter and then see if selecting it in the guest works.
I have tried both, without success.
It might help to post the results of VBoxManage list usbhost

Code: Select all

$ VBoxManage list usbhost
Oracle VM VirtualBox Command Line Management Interface Version 3.2.6
(C) 2005-2010 Oracle Corporation
All rights reserved.

Host USB Devices:

UUID:               17bfb90f-d125-4595-bcb1-1c10daece497
VendorId:           0x0461 (0461)
ProductId:          0x4d15 (4D15)
Revision:           2.0 (0200)
Product:            USB Optical Mouse
Address:            /proc/bus/usb/004/002
Current State:      Unavailable

UUID:               3a4994a6-c57d-4a82-9c53-309785f7daf4
VendorId:           0x04e6 (04E6)
ProductId:          0x5116 (5116)
Revision:           5.24 (0524)
Manufacturer:       SCM Microsystems Inc.
Product:            SCR3310 USB Smart Card Reader
SerialNumber:       21120841214135
Address:            /proc/bus/usb/005/003
Current State:      Unavailable

UUID:               a16cd37c-4f9e-4b7f-a41c-0128b51cb671
VendorId:           0x0781 (0781)
ProductId:          0x5530 (5530)
Revision:           2.0 (0200)
Manufacturer:       SanDisk
Product:            SanDisk Cruzer
SerialNumber:       2585010A60D19D7E
Address:            /proc/bus/usb/001/011
Current State:      Unavailable

UUID:               27b5c5cc-d091-4ed1-bcba-460138d05f37
VendorId:           0x413c (413C)
ProductId:          0x2003 (2003)
Revision:           3.1 (0301)
Manufacturer:       Dell
Product:            Dell USB Keyboard
Address:            /proc/bus/usb/002/002
Current State:      Unavailable
Several checks are included in Chapter 12.6.7. USB not working of your VirtualBox users guide
I've already looked in there as well. The problem with that section is the assumption that all distributions have a usb group. RHEL 5 does not have a usb group, so adding an entry to fstab to give permissions to VB in that manner will not work. I tried it earlier by giving the user of VB access, but that didn't work either.

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 18:00
by wbeebe
Several checks are included in Chapter 12.6.7. USB not working of your VirtualBox users guide
And I forgot to mention that there is no entry for /module/usbcore in RHEL 5.5's version of /etc/udev/rules.d/50-udev.rules.

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 18:19
by Perryg
Test something for me if you would.
Use a blank filter in a guest.
Start the guest then unplug the SanDisk and after 3 seconds or so plug it back in and see if anything happens.
If this does not produce anything the unplug the Microsystem device and the SanDisk then plug in the SanDisk and see if anything happens.
One final thing to test, uncheck USB 2 in the guest settings and post the results of what happens.

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 19:09
by Perryg
Reading the help again and some searching I think I may have a solution for you.
  • Find the vboxusers group number.
  • Create a directory to mount usbfs in:
  • mkdir /vbusbf
  • Add mount to /etc/fstab and change “devgid” value to the GID you obtained from the command above:
  • none /vbusbf usbfs rw.devgid=501,devmode=664 0 0
Since I am not running RHEL as host at the moment I can not test this for you but it looks like it should do the trick. Please let me know how it turn out.

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 19:37
by wbeebe
Use a blank filter in a guest.
Start the guest then unplug the SanDisk and after 3 seconds or so plug it back in and see if anything happens.
Nothing.
If this does not produce anything the unplug the Microsystem device and the SanDisk then plug in the SanDisk and see if anything happens.
Again, nothing.
One final thing to test, uncheck USB 2 in the guest settings and post the results of what happens.
Once again, nothing.

You can tell that VB is noticing when devices are plugged and unplugged from the host, because when you check for USB devices to mount, the list adjusts accordingly. It's just that the list remains grayed out.

The primary reason for getting USB working is to use the USB Smart Card Reader to digitally sign jar files in a client before packing them up in an installer. Right now the workaround is to move the jar file back and forth to the host via a shared folder and just sign the jars on the host.

After working with this configuration, I'm of the opinion that this problem is a unique interaction between RHEL 5 as a host and VB. RHEL 6 is currently in beta; the key with RHEL 6 is its more up-to-date kernel and supporting libraries. Unless you can come up with something definitive and straightforward in a fairly short time, then I'm going to wait to upgrade to RHEL 6 final before trying this again.

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 19:51
by wbeebe
Reading the help again and some searching I think I may have a solution for you.
  • * Find the vboxusers group number.
    * Create a directory to mount usbfs in:
    * mkdir /vbusbf
    * Add mount to /etc/fstab and change “devgid” value to the GID you obtained from the command above:
    * none /vbusbf usbfs rw.devgid=501,devmode=664 0 0
Since I am not running RHEL as host at the moment I can not test this for you but it looks like it should do the trick. Please let me know how it turn out.
It still doesn't work. Like I said, I think I'm going to let this one go until the next release of RHEL.

Thanks for your time.

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 20:03
by hank_se
Have you tried to start VirtualBox with this command, as usb seems to be mounted under /proc :

Code: Select all

VirtualBox VBOX_USB=USBFS
For the above to work you must have permissions set right in fstab as suggested by Perryg.

Do you have anything under /dev/bus/usb? If so what's the output of:

Code: Select all

ls -la /dev/bus/usb/001/001
If not do you have the file /etc/udev/rules.d/10-vboxdrv.rules and whats the content of it?

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 20:43
by wbeebe
Have you tried to start VirtualBox with this command, as usb seems to be mounted under /proc :

Code: Select all

VirtualBox VBOX_USB=USBFS
For the above to work you must have permissions set right in fstab as suggested by Perryg.
Yes, I started a single virtual machine directly, with and without the GUI launcher. Here's the direct command line:

Code: Select all

VirtualBox VBOX_USB=USBFS --comment MINT09_VM136 --startvm 9228c808-c934-4b6d-8439-3b99c3632f42 --no-startvm-errormsgbox
I had everything set up per Perryg. It still fails.
Do you have anything under /dev/bus/usb? If so what's the output of:

Code: Select all

ls -la /dev/bus/usb/001/001

Code: Select all

$ ls -la /dev/bus/usb/001/001 
crw-r--r-- 1 root root 189, 0 Jul 30 11:51 /dev/bus/usb/001/001
If not do you have the file /etc/udev/rules.d/10-vboxdrv.rules and whats the content of it?

Code: Select all

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"

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 30. Jul 2010, 21:01
by hank_se
Now try this change 10-vboxdrv.rules to 60-vboxdrv.rules, reboot and try again. This might brake something else but give it a try!

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 31. Jul 2010, 10:24
by nouvo09
Hi,

I have exactly the same issue with VB running on Centos 5.5.

But on Fedora 12, on an other machine, all runs out of the box .

Re: VirtualBox guest USB inoperative on RHEL 5.5 64-bit host

Posted: 31. Jul 2010, 11:31
by snapshot
Same issue here, on Ubuntu 10.04

I run the "PUEL" version of VirtualBox
I am a member of the vboxusers unix group
I set up the USBid filters accordingly to my devices

It works for some devices, but some other are still grey. I've found a workaround by running VirtualBox as root !

The usbfs filesystem is now deprecated. I can't mount it anymore on my 10.04 ubuntu system. It has been replaced by /dev/bus/usb, but all its files belongs to root with no write permissions. Does VirtualBox rely on it ?