VirtualBox

Opened 13 years ago

Closed 11 years ago

#8978 closed defect (fixed)

Cannot find USB Device after update 4.08 -> fixed as of 8 Jun 2011

Reported by: careliyim Owned by:
Component: USB Version: VirtualBox 4.0.8
Keywords: Connection USB Device problem Cc:
Guest type: Windows Host type: Linux

Description (last modified by Frank Mehnert)

Dear Virtualbox developers,

I have some problems with the updates after Virtualbox version 4.04 r70112 on my laptop of dell. The problem is that I can't find my external usb device.

When I try to add some USB device to my host it gives my the message “no device available”

(this issue is also on version 4.08 all versions older then 4.04 are working)

Laptop details: Dell

Latitude E4310 intel I5 8 GB Ram 360 GB Hard disk

OS:

Ubuntu 10.10 32 bits

I hope you can improve\fix this issue

Kind Regards, Carem Liyim

Attachments (4)

VBoxStrace.tar.gz (5.5 KB ) - added by Carsten 13 years ago.
VBoxSVC strace files
strace-usbfs.txt.gz (5.3 KB ) - added by Michael 13 years ago.
strace of VBoxSVC with VBOX_USB=usbfs
VBoxSVC.strace.zip (62.4 KB ) - added by Richard Myers 13 years ago.
VBOX_USB=sysfs strace -f -o VBoxSVC.strace /usr/lib/virtualbox/VBoxSVC and VBoxManage list usbhost
VBoxSVC.strace.tar.gz (77.3 KB ) - added by LaloHao 11 years ago.

Download all attachments as: .zip

Change History (50)

comment:1 by Michael Thayer, 13 years ago

Is your user account a member of the "vboxusers" group? (Use the "groups" command at the command line to find out). And could you please post the output of the command "VBoxManage list usbhost"? Thanks.

comment:2 by Carsten, 13 years ago

I do have the same issue.

  • CentOS 5.6, 2.6.18-238.9.1.el5, x86_64
  • VirtualBox-4.0-4.0.8_71778_rhel5-1

lsusb shows a attached USB Memory Stick:

# lsusb
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 002: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash Flash
Drive
Bus 005 Device 001: ID 0000:0000
Bus 006 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 007 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 004 Device 002: ID 04b3:3025 IBM Corp.
Bus 004 Device 003: ID 046d:c046 Logitech, Inc. RX1000 Laser Mouse

Output of VBoxManage list usbhost:

# VBoxManage list usbhost
Host USB Devices:

<none>

With previous versions I was able to attach USB devices to my VMs.

comment:3 by careliyim, 13 years ago

Thanks for you're replay,

Yes, I am a member of the "vboxusers" group and my output (older then) version 4.04 is:


Host USB Devices:


UUID:               d312e6c9-69be-4d04-bbf0-6b6bbdb9e3ec
VendorId:           0x0461 (0461)
ProductId:          0x4db1 (4DB1)
Revision:           167.32 (16732)
Manufacturer:       CN0F5CWW7866412M03E4A01
Product:            Laptop_Integrated_Webcam_2M
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4
//device:/dev/vboxusb/001/003
Current State:      Available


UUID:               6f23f2e2-cace-4612-b2c0-dd0ca0512bed
VendorId:           0x07ab (07AB)
ProductId:          0xfc88 (FC88)
Revision:           1.1 (0101)
Manufacturer:       Freecom
Product:            Freecom Mobile Drive XXS
SerialNumber:       310411CA6000
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3
//device:/dev/vboxusb/002/010
Current State:      Available


UUID:               02449085-6413-4b62-bd1c-f54a0c8bafee
VendorId:           0x0a5c (0A5C)
ProductId:          0x5800 (5800)
Revision:           1.1 (0101)
Manufacturer:       Broadcom Corp
Product:            5880
SerialNumber:       0123456789ABCD
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.8
//device:/dev/vboxusb/002/004
Current State:      Available

UUID:               26936a25-ed50-4e73-9df1-13928b348b9e
VendorId:           0x413c (413C)
ProductId:          0x8187 (8187)
Revision:           5.23 (0523)
Manufacturer:       Dell Computer Corp
Product:            DW375 Bluetooth Module
SerialNumber:       1C659DF73042
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7
//device:/dev/vboxusb/002/003
Current State:      Busy

And newer than version 4.04 is:


Host USB Devices:

<none>

Kind Regards,

comment:4 by Michael Thayer, 13 years ago

Next test: the output of the following commands with VirtualBox 4.0.8 (not older versions) installed:

$ ls -ld /dev/vboxusb
$ ls -l /dev/vboxusb

Thanks!

comment:5 by Carsten, 13 years ago

# ls -ld /dev/vboxusb/
drwxr-x--- 9 root vboxusers 180 29. Mai 15:13 /dev/vboxusb/
# ls -l /dev/vboxusb/
insgesamt 0
drwxr-x--- 2 root vboxusers  80 29. Mai 15:13 001
drwxr-x--- 2 root vboxusers  60 29. Mai 15:13 002
drwxr-x--- 2 root vboxusers  60 29. Mai 15:13 003
drwxr-x--- 2 root vboxusers 100 29. Mai 15:13 004
drwxr-x--- 2 root vboxusers  60 29. Mai 15:13 005
drwxr-x--- 2 root vboxusers  60 29. Mai 15:13 006
drwxr-x--- 2 root vboxusers  60 29. Mai 15:13 007

My attempts to attach USB to a VM was executed as root, root itself is not a member of group vboxusers.

comment:6 by Michael Thayer, 13 years ago

Root should not need to be a member of that group to access USB devices. One way to find out more about what is happening would be to run the "strace" tool on the VBoxSVC component of VirtualBox and to execute "VBoxManage list usbhost" while strace is running. You could attach (not paste!) the output of strace to this ticket as a text file. Please let me know if you need more detailed instructions on how to do this.

by Carsten, 13 years ago

Attachment: VBoxStrace.tar.gz added

VBoxSVC strace files

comment:7 by Carsten, 13 years ago

OK, here we go:

# ps ax | grep -i vbox
 4607 pts/0    S+     0:00 grep -i vbox
 5760 ?        S      0:17 /usr/lib/virtualbox/VBoxXPCOMIPCD
 5766 ?        Sl     0:52 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
 5780 ?        SLl   77:29 /usr/lib/virtualbox/VBoxHeadless --comment
Canberra --startvm 3817c4ff-1070-4079-a3f6-7f55e241091c --vrde config
# strace -f -o strace -f -o /tmp/VBoxStrace.log -p 5766

See attached strace files (VBoxStrace.tar.gz).

comment:8 by Michael Thayer, 13 years ago

Jorge3711: I can see what is going wrong (we expect sysfs directories for USB devices to contain a "dev" file with the device number), and it should be easily fixable, but I have no idea why it worked before, as that is not a recent change. I wonder though whether careliyim's issue is the same as yours. careliyims, if you would care to provide the output of

$ ls -ld /dev/vboxusb
$ ls -l /dev/vboxusb

on your host too I might have a better idea. (I may also ask you to follow up with strace output.)

in reply to:  8 comment:9 by Ljubomir Ljubojevic, 13 years ago

I have the same problem. When I switched from 3.2 to 4.0.x I lost ability to use USB as regular user and member of vboxusers group. So I switched to running VB as a root.

Yesterday I tried to run it on CentOS 5.6 and VB 4.0.8 with Extension pack and USB is not accessible.

There is possibility that it worked before do to a quirk of 5.5 kernel, and now when new kernel is out we got compounded effect with newer version of VB. Right now I have now time to run tests, but will find time in next day or two and post results.

comment:10 by Ljubomir Ljubojevic, 13 years ago

I've downgraded VB to VirtualBox-4.0.x86_64 0:4.0.0_69151_rhel5-1 and USB works on root.

I forgot to mention I use X86_64 CentOS 5.6 system.

comment:11 by Michael, 13 years ago

FWIW, I'm seeing the same issue on a RHEL 5.4 system (running kernel 2.6.18-164.el5 x86_64)... So I doubt that working in the past has anything to do with the 5.6 kernel update.

comment:12 by Michael Thayer, 13 years ago

For now you should be able to work around this by setting the environment variable "VBOX_USB=usbfs".

comment:13 by Carsten, 13 years ago

Hm, maybe I misunderstood something:

# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 006 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 002: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash Flash Drive
Bus 002 Device 001: ID 0000:0000
Bus 007 Device 001: ID 0000:0000
Bus 004 Device 003: ID 046d:c046 Logitech, Inc. RX1000 Laser Mouse
Bus 004 Device 001: ID 0000:0000
Bus 004 Device 002: ID 04b3:3025 IBM Corp.
# echo $VBOX_USB
usbfs
# VBoxManage list usbhost
Host USB Devices:

<none>
# id
uid=0(root) gid=0(root) Gruppen=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),63(audio)

by Michael, 13 years ago

Attachment: strace-usbfs.txt.gz added

strace of VBoxSVC with VBOX_USB=usbfs

comment:14 by Michael Thayer, 13 years ago

Here is a link to a 64bit Redhat EL/CentOS 5 build which I hope will fix the USB issues there. Use at your own risk of course, but I hope the risk is very low!

http://www.virtualbox.org/download/testcase/VirtualBox-4.0-4.0.10_72177_rhel5-1.x86_64.rpm

Unfortunately I probably can't help careliyim until I see his strace output as per comment 6.

comment:15 by Michael, 13 years ago

Thanks michael, that updated version fixes the issue (at least for me). Cheers :)

comment:16 by Carsten, 13 years ago

Yes, I can confirm. The fix works for me too. Thank you very much! :)

comment:17 by Michael Thayer, 13 years ago

Thanks for the feedback. I will leave the ticket open for a bit in case Carem wants to provide more feedback.

comment:18 by Ljubomir Ljubojevic, 13 years ago

It works for me to, also in user mode.

Thanks.

comment:19 by Michael Thayer, 13 years ago

By the way, with the build I linked to do you still get no output if you run as root and do the following?

# VBOX_USB=usbfs VBoxManage list usbhost

If so I would be interested in strace output (Zrax's attachment above didn't contain the thread I needed to look at).

comment:20 by Ljubomir Ljubojevic, 13 years ago

With that test build I got this:

[root@kancelarija2 ~]# VBOX_USB=usbfs VBoxManage list usbhost
Host USB Devices:

UUID:               350868d3-2a00-4628-9ab5-f48ac8c69676
VendorId:           0x04a9 (04A9)
ProductId:          0x220d (220D)
Revision:           1.0 (0100)
Manufacturer:       Canon
Product:            CanoScan
Address:            /proc/bus/usb/003/002
Current State:      Available

UUID:               5bf2e98e-3bbb-4397-a180-413ff904129d
VendorId:           0x076b (076B)
ProductId:          0x3021 (3021)
Revision:           3.2 (0302)
Manufacturer:       OMNIKEY AG
Product:            Smart Card Reader USB
Address:            /proc/bus/usb/004/002
Current State:      Available

[root@kancelarija2 ~]# 

comment:21 by Michael, 13 years ago

After making sure the VBoxSVC wasn't running before each command, I see NO devices with VBOX_USB=usbfs, and the correct list of devices without it:

zrax@lnxvcmh1 ~ $ ps -efH | grep -i vbox
zrax     28726  6988  0 09:26 pts/6    00:00:00       grep --color=auto -i vbox

zrax@lnxvcmh1 ~ $ VBoxManage list usbhost
Host USB Devices:

UUID:               5f703491-fbfb-4201-8d8d-345a2e607242
VendorId:           0x03f0 (03F0)
ProductId:          0x020c (020C)
Revision:           0.3 (0003)
Manufacturer:       HP
Product:            Multimedia Keyboard Hub
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.2/usb8/8-1/8-1.1//device:/dev/vboxusb/008/016
Current State:      Busy

UUID:               e3dab67c-bb8e-484e-8690-6942af874d38
VendorId:           0x093a (093A)
ProductId:          0x2510 (2510)
Revision:           1.0 (0100)
Manufacturer:       PIXART
Product:            USB OPTICAL MOUSE
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.2/usb8/8-2//device:/dev/vboxusb/008/015
Current State:      Busy

zrax@lnxvcmh1 ~ $ ps -efH | grep -i vbox
zrax     28758  6988  0 09:26 pts/6    00:00:00       grep --color=auto -i vbox
zrax     28740     1  0 09:26 ?        00:00:00   /usr/lib/virtualbox/VBoxXPCOMIPCD
zrax     28745     1  0 09:26 ?        00:00:00   /usr/lib/virtualbox/VBoxSVC --auto-shutdown
zrax@lnxvcmh1 ~ $ ps -efH | grep -i vbox
zrax     28762  6988  0 09:26 pts/6    00:00:00       grep --color=auto -i vbox
zrax@lnxvcmh1 ~ $ VBOX_USB=usbfs VBoxManage list usbhost
Host USB Devices:

<none>

comment:22 by Michael, 13 years ago

Ah, sorry, I missed the part about running as root... In that case, I do also see correct output with VBOX_USB=usbfs

in reply to:  22 comment:23 by f1lter, 13 years ago

Just confirming that VirtualBox-4.0-4.0.10_72177_rhel5-1.x86_64.rpm also fixed my usb issues. No creating of usbfs mountpoints, no modifying of ENV variables. I just works. (Centos 5.5, 64 bit). Thanks!

comment:24 by Michael Thayer, 13 years ago

Summary: Cannot find USB Device after update 4.08Cannot find USB Device after update 4.08 -> fixed as of 8 Jun 2011

Thanks for testing. I will consider this fixed.

comment:25 by careliyim, 13 years ago

Connection USB Device problem WORKS!!!!

But i needed to open up a terminal and start virtualbox under sudo thanks guys!

Now there is only 1 thing to fix and that is aero effect windows 7.

Keep up the good work.

Kind regards, Careliyim Liyim

in reply to:  25 comment:26 by Michael Thayer, 13 years ago

Replying to careliyim:

Connection USB Device problem WORKS!!!!

But i needed to open up a terminal and start virtualbox under sudo

This shouldn't actually be necessary. If you are interested in working out what is wrong you can try to create the log files I asked for by making sure that nothing VirtualBox-related is running, then (as user) running

$ strace -o VBoxSVC.out -ff <VirtualBox installation path>/VBoxSVC

in one terminal window and

$ VBoxManage list usbhost

in another. After this you can exit stop the process in the first window with Ctrl-C, zip up the log files produced (VBoxSVC.out.*) and attach the archive to this ticket.

Of course if you are happy with things as they are we can drop this.

comment:27 by Peter, 13 years ago

I believe I ran into this problem to, although I'm running Windows 7 x64.

with a Windows XP SP3 Guest. Basically, the Virtualbox host, doesnt' seem to be able to recognize the USB CAC Card reader. Windows 7 seems to recognize it. When I do the VBoxManage.exe list usbhost it only shows this: C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list usbhost Host USB Devices:

Is there an equaivalent command for Windows?

VBOX_USB=usbfs VBoxManage list usbhost

UUID: a0888357-554f-4324-9ff9-b6fe7b099e8f VendorId: 0x046d (046D) ProductId: 0xc016 (C016) Revision: 3.64 (0364) Manufacturer: Logitech Product: Optical USB Mouse Address: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0021 Current State: Busy

UUID: 6a08af2b-914c-41b7-ade4-c3e9ded9159d VendorId: 0x0a5c (0A5C) ProductId: 0x5802 (5802) Revision: 1.1 (0101) Manufacturer: Broadcom Corp Product: 5880 SerialNumber: 0123456789ABCD Address: {36fc9e60-c465-11cf-8056-444553540000}\0016 Current State: Captured

UUID: 8ff32f55-3de7-4b83-9338-a2f829706a4a VendorId: 0x413c (413C) ProductId: 0x2106 (2106) Revision: 1.1 (0101) Manufacturer: DELL Product: Dell QuietKey Keyboard Address: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0038 Current State: Busy

It use to work some previous version ago, probably in VB 3.12 or something. The reason is I had a VBOX Guest that had this USB Filter set.

Name: Gemplus USB SmartCard Reader[0100] Vendor ID: 08e6 Product ID: 3437 Revision: 0100 Manufacturer: Gemplus Product: USB SmartCard Reader

Now however, it doesn't seem to be even recognized when I click on the add Filter from device

comment:28 by Frank Mehnert, 13 years ago

Please check VBox 4.0.10.

in reply to:  27 comment:29 by Michael Thayer, 13 years ago

Replying to swingkid:

I believe I ran into this problem to, although I'm running Windows 7 x64.

with a Windows XP SP3 Guest.

If version 4.0.10 doesn't make a difference you are probably best opening a new ticket, as our USB support is very different internally on Windows and Linux hosts.

comment:30 by Richard Myers, 13 years ago

I'm using 4.0.10 and EL5.6 (Centos 5.6, 64-bit). I have the same problem as above. I have to execute VBoxManage list usbhost as root to get any output. This was working before 4.0.8.

[rmm@endo GUI]$ ls -ld /dev/vboxusb
drwxrwx--- 6 root vboxusers 120 Jun 28 14:27 /dev/vboxusb
[rmm@endo GUI]$ ls -l /dev/vboxusb
total 0
drwxrwx--- 2 root vboxusers 60 Jun 23 10:46 001
drwxrwx--- 2 root vboxusers 60 Jun 29 09:36 003
drwxrwx--- 2 root vboxusers 60 May 31 11:45 004
drwxrwx--- 2 root vboxusers 80 May 31 11:45 006

I added the group and execute permissions, otherwise there was no output for non-root. I am in the vboxusers group.

[rmm@endo GUI]$ VBOX_USB=usbfs VBoxManage list usbhost 
Host USB Devices:

<none>

comment:31 by Michael Thayer, 13 years ago

Sorry to sound dense, but what did it look like before you added permissions? (I.e. ls as root.) And what is the result of

VBOX_USB=sysfs VBoxManage list usbhost

?

comment:32 by Richard Myers, 13 years ago

This is how the permissions were set to begin with:

[rmm@endo GUI]$ ls -ld /dev/vboxusb
drw-r----- 6 root vboxusers 120 Jun 28 14:27 /dev/vboxusb

[rmm@endo GUI]$ ls -l /dev/vboxusb
total 0
?--------- ? ? ? ?            ? 001
?--------- ? ? ? ?            ? 003
?--------- ? ? ? ?            ? 004
?--------- ? ? ? ?            ? 006

Adding group execute and group write permissions fixed the problem.

[rmm@endo GUI]$ ls -l /dev/vboxusb
total 0
drwxrwx--- 2 root vboxusers 60 Jun 23 10:46 001
drwxrwx--- 2 root vboxusers 60 Jun 29 09:36 003
drwxrwx--- 2 root vboxusers 60 May 31 11:45 004
drwxrwx--- 2 root vboxusers 80 May 31 11:45 006

As in my previous post above, before changing the permissions, running: VBOX_USB=sysfs VBoxManage list usbhost (with or without VBOX_USB=sysfs) gave:

[rmm@endo GUI]$ VBOX_USB=sysfs VBoxManage list usbhost

Host USB Devices:

<none>

With the permisions changed, it gives (with or without VBOX_USB=sysfs):

[rmm@endo GUI]$ VBOX_USB=sysfs VBoxManage list usbhost
Host USB Devices:

UUID:               e84c027d-3410-4e7d-816d-87b89505cce0
VendorId:           0x045e (045E)
ProductId:          0x00e1 (00E1)
Revision:           0.7 (0007)
Manufacturer:       Microsoft
Product:            Microsoft Wireless Optical Mouse® 1.00
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1//device:/dev/vboxusb/004/002
Current State:      Busy

UUID:               ad1957de-4469-43b0-b5d5-4456b80dedc8
VendorId:           0x058f (058F)
ProductId:          0x6362 (6362)
Revision:           1.38 (0138)
Manufacturer:       Generic
Product:            Mass Storage Device
SerialNumber:       058F312D81B
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-2//device:/dev/vboxusb/001/002
Current State:      Busy

UUID:               f000744f-3b44-4f8d-b5d3-6d983b9784d8
VendorId:           0x067b (067B)
ProductId:          0x2303 (2303)
Revision:           3.0 (0300)
Manufacturer:       Prolific Technology Inc.
Product:            USB-Serial Controller
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-2//device:/dev/vboxusb/006/003
Current State:      Busy

UUID:               a8d981ab-6614-4ae4-9a6e-f23e1dc2bce1
VendorId:           0x0764 (0764)
ProductId:          0x0501 (0501)
Revision:           0.1 (0001)
Manufacturer:       CPS
Product:             CP 1500C
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-1//device:/dev/vboxusb/006/002
Current State:      Busy

[rmm@endo GUI]$ VBoxManage list usbhost
Host USB Devices:

UUID:               7ab6e24f-c2fc-4c74-8ce4-b2e1b6f11ffa
VendorId:           0x045e (045E)
ProductId:          0x00e1 (00E1)
Revision:           0.7 (0007)
Manufacturer:       Microsoft
Product:            Microsoft Wireless Optical Mouse® 1.00
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1//device:/dev/vboxusb/004/002
Current State:      Busy

UUID:               2a1dc724-58fe-4a7d-b84e-edb5cc3fc58e
VendorId:           0x058f (058F)
ProductId:          0x6362 (6362)
Revision:           1.38 (0138)
Manufacturer:       Generic
Product:            Mass Storage Device
SerialNumber:       058F312D81B
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-2//device:/dev/vboxusb/001/002
Current State:      Busy

UUID:               6d4982ad-f6e0-4d1c-b1d5-b70e0e23b845
VendorId:           0x067b (067B)
ProductId:          0x2303 (2303)
Revision:           3.0 (0300)
Manufacturer:       Prolific Technology Inc.
Product:            USB-Serial Controller
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-2//device:/dev/vboxusb/006/003
Current State:      Busy

UUID:               a8a38078-4371-4324-8347-b6199ae7afc8
VendorId:           0x0764 (0764)
ProductId:          0x0501 (0501)
Revision:           0.1 (0001)
Manufacturer:       CPS
Product:             CP 1500C
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-1//device:/dev/vboxusb/006/002
Current State:      Busy

comment:33 by Michael Thayer, 13 years ago

This is what I get doing a grep on my local source tree:

$ find src/VBox/ include/ Config.kmk Makefile.kmk ! -regex '.*/\..?.*' ! -regex '.*~' -exec grep -I 'vboxusb' '{}' '+'
[...]
src/VBox/Installer/linux/vboxdrv.sh.in:        mkdir -p -m 0750 /dev/vboxusb 2>/dev/null
src/VBox/Installer/linux/vboxdrv.sh.in:        chown root:vboxusers /dev/vboxusb 2>/dev/null
[...]
src/VBox/Installer/linux/VBoxCreateUSBNode.sh:  mkdir /dev/vboxusb -m 0750 2>/dev/null
src/VBox/Installer/linux/VBoxCreateUSBNode.sh:  chown root:$group /dev/vboxusb 2>/dev/null
[...]

and

$ cat src/VBox/Installer/linux/VBoxCreateUSBNode.sh
#! /bin/sh
[...]
  mknod "$devpath" c $1 $2 -m 0660 2>/dev/null
[...]

As you can see, we explicitly set the permissions and ownership on /dev/vboxusb (and the device nodes). Do you have any idea why that is not working as it should on your system? (By the way I will be off-line for a few weeks, so don't worry if you don't get a fast response.)

comment:34 by Richard Myers, 13 years ago

I think you need to do one of two things; either remove -r the current /dev/vboxusb before doing the mkdir, OR set the permissions in a seperate line. I believe that if the directory already exists, the mkdir and its associated permissions will do nothing.

man mkdir ... DESCRIPTION

Create the DIRECTORY(ies), if they do not already exist.

I did a quick test on my system to verify this behavior. Does yours do something different?

Same deal with the mknod. If the character device already exists, the -m 0660 will not change the permissions. If you want to make sure the permissions are a certain way, then use chmod after the mknod.

comment:35 by Michael Thayer, 13 years ago

Sounds reasonable. I tend towards doing rm -r first, to have a clean slate. If you change the permissions once manually though, does that fix the problem permanently or do you have to change them again e.g. after reboot? If so it would be interesting to know why.

comment:36 by Richard Myers, 13 years ago

I really don't know. All these strange file systems and device filesystems, like procfs, devfs, sysfs, etc. are kind of a mystery to me. Once I get familiar with one of them, they change to something different.

Rebooting right now would be inconvenient to me, so I'm not inclined to test out what happens to permissions after a reboot (at the moment). I take it that you don't have a sysfs system available?

comment:37 by Michael Thayer, 13 years ago

I do, but everything works without any problems on the systems I have available, and I am interested to know why something goes wrong on yours.

comment:38 by Richard Myers, 13 years ago

It could be because I'm not using a stock kernel. For various reasons, I upgraded to 2.6.32 awhile back. I've recently updated it to 2.6.32.39. I wouldn't be surprised if it behaves differently because I'm not using the stock RH 2.6.18 kernels. Every so often, I inadvertently boot up a stock kernel and of course the Vbox kernel modules don't work and have to be rebuilt for the 2.6.18 kernel. Then I eventually realize what happened and have to rebuild certain modules for 2.6.32 again once it's booted. Anyway, this may have something to do with how the permissions got changed as they did, though I'm not the only one with this issue on upgrading to 4.0.8. Seems like it would still be a good idea to explicitly set them in a separate command the way you want them. When I reboot, I'll try to run some tests on how the device permissions get set after a reboot and get back to you.

comment:39 by Michael Thayer, 13 years ago

If you are going to have an opportunity to reboot any time though, it would be great if you could first see whether your manual permissions change persists, as I think it should. If so then doing an rm -f in future releases as discussed above will be sufficient and we don't need to investigate further.

comment:40 by Richard Myers, 13 years ago

I've rebooted and the permissions and ownership of /dev/vboxusb (and its sub-directories) are as I left them. However,

VBOX_USB=sysfs VBoxManage list usbhost

gives nothing unless I do it as root. None of my USB devices show up in WinXp (under Centos 5.6 host) unless I run Vbox as root. I'm running VirtualBox 4.0.12 (along with the corresponding Guest Additions). I am a member of the vboxusers group.

 [rmm@endo gtkwave3]$ ls -la /dev/vboxusb
total 0
drwxr-x---  8 root vboxusers  160 Aug 26 13:58 .
drwxr-xr-x 14 root root      4800 Aug 29 15:00 ..
drwxr-x---  2 root vboxusers   60 Jul 28 18:58 001
drwxr-x---  2 root vboxusers   40 Aug  5 17:11 002
drwxr-x---  2 root vboxusers   60 Aug 29 15:00 003
drwxr-x---  2 root vboxusers   60 Jul 28 18:58 004
drwxr-x---  2 root vboxusers   80 Jul 26 11:25 006
drwxr-x---  2 root vboxusers   40 Aug 29 14:59 007
[rmm@endo gtkwave3]$ ls -la /dev/vboxusb/001
total 0
drwxr-x--- 2 root vboxusers       60 Jul 28 18:58 .
drwxr-x--- 8 root vboxusers      160 Aug 26 13:58 ..
crw-rw---- 1 root vboxusers 189, 115 Jul 28 18:58 116
[rmm@endo gtkwave3]$ ls -la /dev/vboxusb/002
total 0
drwxr-x--- 2 root vboxusers  40 Aug  5 17:11 .
drwxr-x--- 8 root vboxusers 160 Aug 26 13:58 ..
[rmm@endo gtkwave3]$ ls -la /dev/vboxusb/003
total 0
drwxr-x--- 2 root vboxusers       60 Aug 29 15:00 .
drwxr-x--- 8 root vboxusers      160 Aug 26 13:58 ..
crw-rw---- 1 root vboxusers 189, 355 Aug 29 15:00 100
[rmm@endo gtkwave3]$ ls -la /dev/vboxusb/004
total 0
drwxr-x--- 2 root vboxusers       60 Jul 28 18:58 .
drwxr-x--- 8 root vboxusers      160 Aug 26 13:58 ..
crw-rw---- 1 root vboxusers 189, 386 Jul 28 18:58 003
[rmm@endo gtkwave3]$ ls -la /dev/vboxusb/006
total 0
drwxr-x--- 2 root vboxusers       80 Jul 26 11:25 .
drwxr-x--- 8 root vboxusers      160 Aug 26 13:58 ..
crw-rw---- 1 root vboxusers 189, 641 Jul 26 11:25 002
crw-rw---- 1 root vboxusers 189, 642 Aug 16 14:59 003

[rmm@endo gtkwave3]$ VBoxManage list usbhost
Host USB Devices:

<none>

[rmm@endo gtkwave3]$ sudo VBOX_USB=sysfs VBoxManage list usbhost
Host USB Devices:

UUID:               02419bfb-edcd-41b5-b64f-62cc539466f2
VendorId:           0x0451 (0451)
ProductId:          0xf430 (F430)
Revision:           1.1 (0101)
Manufacturer:       Texas Instruments
Product:            MSP-FET430UIF JTAG Tool
SerialNumber:       TUSB34101C0AD830C459FF91
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1//device:/dev/vboxusb/003/100
Current State:      Busy

UUID:               9b6d12f0-876d-4844-8493-eefa4ec3abcb
VendorId:           0x045e (045E)
ProductId:          0x00e1 (00E1)
Revision:           0.7 (0007)
Manufacturer:       Microsoft
Product:            Microsoft Wireless Optical Mouse® 1.00
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1//device:/dev/vboxusb/004/003
Current State:      Busy

UUID:               bcaac002-6cc1-4505-a701-2e5a686cca9c
VendorId:           0x058f (058F)
ProductId:          0x6362 (6362)
Revision:           1.38 (0138)
Manufacturer:       Generic
Product:            Mass Storage Device
SerialNumber:       058F312D81B
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-2//device:/dev/vboxusb/001/116
Current State:      Busy

UUID:               f09a4440-ce11-4d02-bd99-4d2fcb6eaad0
VendorId:           0x067b (067B)
ProductId:          0x2303 (2303)
Revision:           3.0 (0300)[rmm@endo gtkwave3]$ sudo VBOX_USB=sysfs VBoxManage list usbhost
Host USB Devices:

UUID:               02419bfb-edcd-41b5-b64f-62cc539466f2
VendorId:           0x0451 (0451)
ProductId:          0xf430 (F430)
Revision:           1.1 (0101)
Manufacturer:       Texas Instruments
Product:            MSP-FET430UIF JTAG Tool
SerialNumber:       TUSB34101C0AD830C459FF91
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1//device:/dev/vboxusb/003/100
Current State:      Busy

UUID:               9b6d12f0-876d-4844-8493-eefa4ec3abcb
VendorId:           0x045e (045E)
ProductId:          0x00e1 (00E1)
Revision:           0.7 (0007)
Manufacturer:       Microsoft
Product:            Microsoft Wireless Optical Mouse® 1.00
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1//device:/dev/vboxusb/004/003
Current State:      Busy

UUID:               bcaac002-6cc1-4505-a701-2e5a686cca9c
VendorId:           0x058f (058F)
ProductId:          0x6362 (6362)
Revision:           1.38 (0138)
Manufacturer:       Generic
Product:            Mass Storage Device
SerialNumber:       058F312D81B
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-2//device:/dev/vboxusb/001/116
Current State:      Busy

UUID:               f09a4440-ce11-4d02-bd99-4d2fcb6eaad0
VendorId:           0x067b (067B)
ProductId:          0x2303 (2303)
Revision:           3.0 (0300)
Manufacturer:       Prolific Technology Inc.
Product:            USB-Serial Controller
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-2//device:/dev/vboxusb/006/003
Current State:      Busy

UUID:               60a717d7-6fec-4771-bf79-1f7f2bf68271
VendorId:           0x0764 (0764)
ProductId:          0x0501 (0501)
Revision:           0.1 (0001)
Manufacturer:       CPS
Product:             CP 1500C
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-1//device:/dev/vboxusb/006/002
Current State:      Busy


Manufacturer:       Prolific Technology Inc.
Product:            USB-Serial Controller
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-2//device:/dev/vboxusb/006/003
Current State:      Busy

UUID:               60a717d7-6fec-4771-bf79-1f7f2bf68271
VendorId:           0x0764 (0764)
ProductId:          0x0501 (0501)
Revision:           0.1 (0001)
Manufacturer:       CPS
Product:             CP 1500C
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-1//device:/dev/vboxusb/006/002
Current State:      Busy

The behavior seems to have changed with 4.0.12. Prior to this, I was able to set the ownership and permissions correctly and run Vbox as myself, and use my USB devices. Now, no matter what I do, I can only use my USB devices if I run Vbox as root.

comment:41 by Ljubomir Ljubojevic, 13 years ago

I can NOT confirm this.

I am on CentOS 5.6 (x86_64) and VirtualBox 4.0.12, WITH stock kernel, and I see all USB device normaly as before, both as regular user and root.

@dickmyers, are you on the stock kernel or on the vanila kernel?

in reply to:  40 comment:42 by Michael Thayer, 13 years ago

Replying to dickmyers:

I've rebooted and the permissions and ownership of /dev/vboxusb (and its sub-directories) are as I left them. However,

[...]

The behavior seems to have changed with 4.0.12. Prior to this, I was able to set the ownership and permissions correctly and run Vbox as myself, and use my USB devices. Now, no matter what I do, I can only use my USB devices if I run Vbox as root.

Would you be able to get me an strace log of what is happening when you run "VBoxManage list usbhost" as user? Specifically, make sure that no VirtualBox processes are running:

$ ps aux | grep Box

start the VBoxSVC server process under strace (correcting the path if necessary):

$ VBOX_USB=sysfs strace -f -o VBoxSVC.strace /usr/lib/virtualbox/VBoxSVC

then run VBoxManage in a different terminal (you don't need VBOX_USB=sysfs here as that is only there to be passed on to VBoxSVC):

$ VBoxManage list usbhost

after which you can stop VBoxSVC with Ctrl-C and attach the strace log "VBoxSVS.log" to this ticket.

Thanks!

by Richard Myers, 13 years ago

Attachment: VBoxSVC.strace.zip added

VBOX_USB=sysfs strace -f -o VBoxSVC.strace /usr/lib/virtualbox/VBoxSVC and VBoxManage list usbhost

comment:43 by Richard Myers, 13 years ago

OK, I attached the stace. Sorry for the delay ...

comment:44 by Frank Mehnert, 11 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

Please reopen if still relevant with VBox 4.2.18.

by LaloHao, 11 years ago

Attachment: VBoxSVC.strace.tar.gz added

comment:45 by LaloHao, 11 years ago

Resolution: fixed
Status: closedreopened

I am having same problem after upgrading 4.2-16 to 4.2-18

comment:46 by Michael Thayer, 11 years ago

Resolution: fixed
Status: reopenedclosed

From the trace file that you uploaded it looks as though the device nodes under /dev/vboxusb were not created. Since you did not provide additional information about your host set-up I can only guess what might have gone wrong (init script or udev rule not properly installed?), but I suspect that it is a configuration problem and not a bug. Did you try looking for help on the forums, IRC or user mailing list before re-opening this bug report?

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use