VirtualBox

Ticket #10816 (new defect)

Opened 21 months ago

Last modified 18 months ago

VirtualBox USB Broken

Reported by: dj_bushido Owned by:
Priority: critical Component: USB
Version: VirtualBox 4.1.18 Keywords: VBoxManage USB proc bus
Cc: Guest type: all
Host type: Linux

Description

Hello everyone! I've recently been running into an issue with VirtualBox where the VBoxManage command can't mount a USB drive. The way our system is set up, a udev script grabs the USB device when it's plugged in, and under conditions, tells VBoxManage to mount the drive in the VM (VBoxManage controlvm usbattach). This way, it's not allowed to be marked busy. Previously, this was confirmed working, I'm not sure what broke. An example of the full command line is 'VBoxManage controlvm <vm_name> usbattach /proc/bus/usb/001/005' When trying to do this, VBoxManage reports:

VBoxManage: error: Could not find a USB device with address '/proc/bus/usb/001/009'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component Host, interface IHost, callee nsISupports
Context: "FindUSBDeviceByAddress(Bstr(a->argv[2]).raw(), dev.asOutParam())" at line 842 of file VBoxManageControlVM.cpp

I'm not exactly sure on what version this stopped working, but we are running 4.1.8 currently. I did also test it, the issue is present on 4.1.18. Might there be any hints to why this isn't working? This exact system has previously been working on VirtualBox 4, not sure where everything died. Also, this ticket seems to show a similar issue, not sure if it is related: https://www.virtualbox.org/ticket/8978 Please let me know if there's anything else that I can do to help, happy to provide as much info as is necessary. Thank you much!

Change History

comment:1 Changed 21 months ago by michael

Is there a reason why you are using usbfs (at least, it looks like you are), which has been deprecated for six or seven years now? Could you please provide the output of "VBoxManage list usbhost", run as the user who runs VirtualBox, as well as "ls -lR /dev/vboxusb" just after triggering an error like you described (and please include the device address from the error as well).

Thanks.

Last edited 21 months ago by michael (previous) (diff)

comment:2 Changed 21 months ago by dj_bushido

Well, I'm currently running this on RHEL 5. The /proc/bus/usb is what udev puts in the environment when a USB drive is mounted, and it's been working so far. And I was unaware usbfs was deprecated. Thank you for that. By any means, the information you needed:

export (before the mount was attempted):

declare -x ACTION="add"
declare -x DEVICE="/proc/bus/usb/001/007"
declare -x DEVPATH="/devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.0"
declare -x INTERFACE="8/6/80"
declare -x MODALIAS="usb:v090Cp1000d1100dc00dsc00dp00ic08isc06ip50"
declare -x OLDPWD
declare -x PHYSDEVBUS="usb"
declare -x PRODUCT="90c/1000/1100"
declare -x PWD="/"
declare -x SEQNUM="1187"
declare -x SHLVL="1"
declare -x SUBSYSTEM="usb"
declare -x TYPE="0/0/0"
declare -x UDEVD_EVENT="1"
declare -x UDEV_LOG="3"

VBoxManage list usbhost (run immediately before attempting the mount):

Host USB Devices:

UUID:               ce29c64b-5f10-4fa5-b833-995147badb4d
VendorId:           0x05ac (05AC)
ProductId:          0x820a (820A)
Revision:           1.0 (0100)
Address:            sysfs:/sys/devices/pci0000:00/0000:00:06.0/usb4/4-1/4-1.2//device:/dev/vboxusb/004/005
Current State:      Busy

UUID:               abbefd93-0523-4b58-8f37-43f2707aaa80
VendorId:           0x05ac (05AC)
ProductId:          0x820b (820B)
Revision:           1.0 (0100)
Address:            sysfs:/sys/devices/pci0000:00/0000:00:06.0/usb4/4-1/4-1.3//device:/dev/vboxusb/004/006
Current State:      Busy

UUID:               fc27c356-fa31-4558-93b0-5879a51d6440
VendorId:           0x05ac (05AC)
ProductId:          0x8215 (8215)
Revision:           1.130 (01130)
Manufacturer:       Apple Inc.
Product:            Bluetooth USB Host Controller
SerialNumber:       00264AA4D5E8
Address:            sysfs:/sys/devices/pci0000:00/0000:00:06.0/usb4/4-1/4-1.1//device:/dev/vboxusb/004/004
Current State:      Available

UUID:               b2600431-90cf-4303-9c8b-d575dd2505c7
VendorId:           0x05ac (05AC)
ProductId:          0x8242 (8242)
Revision:           0.22 (0022)
Manufacturer:       Apple Computer, Inc.
Product:            IR Receiver
Address:            sysfs:/sys/devices/pci0000:00/0000:00:04.0/usb3/3-5//device:/dev/vboxusb/003/003
Current State:      Busy

UUID:               1209005a-1d62-4453-8b45-21d6b5f6b762
VendorId:           0x05ac (05AC)
ProductId:          0x8403 (8403)
Revision:           152.51 (15251)
Manufacturer:       Apple
Product:            Card Reader
SerialNumber:       000000009833
Address:            sysfs:/sys/devices/pci0000:00/0000:00:06.1/usb2/2-5//device:/dev/vboxusb/002/004
Current State:      Busy

UUID:               cc3e4df6-d64c-4d9d-8c73-bd890e8e1f00
VendorId:           0x05ac (05AC)
ProductId:          0x8502 (8502)
Revision:           2.48 (0248)
Manufacturer:       Apple Inc.
Product:            Built-in iSight
SerialNumber:       8T99T3JB177H3L00
Address:            sysfs:/sys/devices/pci0000:00/0000:00:04.1/usb1/1-4//device:/dev/vboxusb/001/003
Current State:      Busy

UUID:               9374d295-8087-419d-b23c-db5c02ed77a8
VendorId:           0x413c (413C)
ProductId:          0x2105 (2105)
Revision:           3.82 (0382)
Manufacturer:       Dell
Product:            Dell USB Keyboard
Address:            sysfs:/sys/devices/pci0000:00/0000:00:06.0/usb4/4-4//device:/dev/vboxusb/004/003
Current State:      Busy

UUID:               12c910ea-c008-47c0-b201-069035f9ce8c
VendorId:           0x413c (413C)
ProductId:          0x3012 (3012)
Revision:           67.1 (6701)
Manufacturer:       Dell
Product:            Dell USB Optical Mouse
Address:            sysfs:/sys/devices/pci0000:00/0000:00:04.0/usb3/3-3//device:/dev/vboxusb/003/002
Current State:      Busy

Output of attempted mount command:

VBoxManage: error: Could not find a USB device with address '/proc/bus/usb/001/007'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component Host, interface IHost, callee nsISupports
Context: "FindUSBDeviceByAddress(Bstr(a->argv[2]).raw(), dev.asOutParam())" at line 830 of file VBoxManageControlVM.cpp

ls -lR /dev/vboxusb (after attempted mount):

/dev/vboxusb:
total 0
drwxr-x--- 2 root vboxusers  80 Aug 16 15:17 001
drwxr-x--- 2 root vboxusers  80 Aug 16 15:15 002
drwxr-x--- 2 root vboxusers 100 Aug 16 06:03 003
drwxr-x--- 2 root vboxusers 160 Aug 16 06:03 004

/dev/vboxusb/001:
total 0
crw-rw---- 1 root vboxusers 189, 0 Aug 16 06:03 001
crw-rw---- 1 root vboxusers 189, 2 Aug 16 06:03 003

/dev/vboxusb/002:
total 0
crw-rw---- 1 root vboxusers 189, 128 Aug 16 06:03 001
crw-rw---- 1 root vboxusers 189, 131 Aug 16 06:03 004

/dev/vboxusb/003:
total 0
crw-rw---- 1 root vboxusers 189, 256 Aug 16 06:03 001
crw-rw---- 1 root vboxusers 189, 257 Aug 16 06:03 002
crw-rw---- 1 root vboxusers 189, 258 Aug 16 06:03 003

/dev/vboxusb/004:
total 0
crw-rw---- 1 root vboxusers 189, 384 Aug 16 06:03 001
crw-rw---- 1 root vboxusers 189, 385 Aug 16 06:03 002
crw-rw---- 1 root vboxusers 189, 386 Aug 16 06:03 003
crw-rw---- 1 root vboxusers 189, 387 Aug 16 06:03 004
crw-rw---- 1 root vboxusers 189, 388 Aug 16 06:03 005
crw-rw---- 1 root vboxusers 189, 389 Aug 16 06:03 006

lsusb (after mount):

Bus 001 Device 001: ID 0000:0000  
Bus 001 Device 003: ID 05ac:8502 Apple, Inc. Built-in iSight
Bus 002 Device 001: ID 0000:0000  
Bus 002 Device 004: ID 05ac:8403 Apple, Inc. Internal Memory Card Reader
Bus 003 Device 001: ID 0000:0000  
Bus 003 Device 002: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse
Bus 003 Device 003: ID 05ac:8242 Apple, Inc. IR Receiver [built-in]
Bus 004 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 004 Device 001: ID 0000:0000  
Bus 004 Device 004: ID 05ac:8215 Apple, Inc. Bluetooth USB Host Controller
Bus 004 Device 005: ID 05ac:820a Apple, Inc. 
Bus 004 Device 003: ID 413c:2105 Dell Computer Corp. Model L100 Keyboard
Bus 004 Device 006: ID 05ac:820b Apple, Inc. 

Please let me know if you need anything else. The USB drive I was testing with was plugged in on a multi-tap, but I can confirm that the same result happens if a multitap is not used. The drive was successfully mounted in Linux after this output was generated.

Version 0, edited 21 months ago by dj_bushido (next)

comment:3 follow-up: ↓ 4 Changed 19 months ago by michael

You could try using the address given by "VBoxManage list usbhost" rather than something in /proc/bus/usb. And can you tell me which device it is in the output of that command, or ls -lR or of lsusb?

comment:4 in reply to: ↑ 3 Changed 19 months ago by dj_bushido

Replying to michael:

You could try using the address given by "VBoxManage list usbhost" rather than something in /proc/bus/usb. And can you tell me which device it is in the output of that command, or ls -lR or of lsusb?

While that sounds good on paper, VirtualBox doesn't recognize the device until it's mounted in Linux. So while I do have a /proc/bus/usb address to work off of, VirtualBox won't give me a UUID.

I'm also re-posting the debug logs from a separate run, as these are closer to what the actual environment looks like:

export (before mount attempt):

declare -x ACTION="add"
declare -x DEVICE="/proc/bus/usb/001/003"
declare -x DEVPATH="/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0"
declare -x INTERFACE="8/6/80"
declare -x MODALIAS="usb:v090Cp1000d1100dc00dsc00dp00ic08isc06ip50"
declare -x OLDPWD
declare -x PHYSDEVBUS="usb"
declare -x PRODUCT="90c/1000/1100"
declare -x PWD="/"
declare -x SEQNUM="1381"
declare -x SHLVL="1"
declare -x SUBSYSTEM="usb"
declare -x TYPE="0/0/0"
declare -x UDEVD_EVENT="1"
declare -x UDEV_LOG="3"

lsusb (before mount attempt):

Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 0000:0000  
Bus 002 Device 023: ID 0461:4d81 Primax Electronics, Ltd 
Bus 002 Device 021: ID 050d:3201 Belkin Components F1DF102U/F1DG102U Flip KVM
Bus 002 Device 022: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
Bus 002 Device 003: ID 0424:2524 Standard Microsystems Corp. USB MultiSwitch Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 0000:0000

VBoxManage list usbhost (before mount attempt):

Host USB Devices:

UUID:               d96e617e-9e2a-452b-962f-0a08c332468c
VendorId:           0x0461 (0461)
ProductId:          0x4d81 (4D81)
Revision:           2.0 (0200)
Product:            USB Optical Mouse
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.3//device:/dev/vboxusb/002/023
Current State:      Busy

UUID:               f6cd20af-6f61-45df-8bc5-f715dea9b1d2
VendorId:           0x050d (050D)
ProductId:          0x3201 (3201)
Revision:           2.52 (0252)
Manufacturer:       Belkin Corporation
Product:            Flip CC
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.1//device:/dev/vboxusb/002/021
Current State:      Busy

UUID:               d423b24b-c5a2-4d68-b209-96693c97ebf5
VendorId:           0x413c (413C)
ProductId:          0x2005 (2005)
Revision:           1.4 (0104)
Manufacturer:       DELL
Product:            DELL USB Keyboard
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.4//device:/dev/vboxusb/002/022
Current State:      Busy

Output of mount attempt (VBoxManage -q controlvm <vm_name> usbattach /proc/bus/usb/001/003):

VBoxManage: error: Could not find a USB device with address '/proc/bus/usb/001/003'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component Host, interface IHost, callee nsISupports
Context: "FindUSBDeviceByAddress(Bstr(a->argv[2]).raw(), dev.asOutParam())" at line 830 of file VBoxManageControlVM.cpp

VBoxManage list usbhost (after mount attempt):

Host USB Devices:

UUID:               bc50175b-4969-41d7-8ecb-f140ec0cb989
VendorId:           0x0461 (0461)
ProductId:          0x4d81 (4D81)
Revision:           2.0 (0200)
Product:            USB Optical Mouse
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.3//device:/dev/vboxusb/002/027
Current State:      Busy

UUID:               5de3a816-24aa-4d8a-a81f-2aaf5fa55595
VendorId:           0x050d (050D)
ProductId:          0x3201 (3201)
Revision:           2.52 (0252)
Manufacturer:       Belkin Corporation
Product:            Flip CC
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.1//device:/dev/vboxusb/002/025
Current State:      Busy

UUID:               3bc5a96f-4013-436b-93c9-10443606b19a
VendorId:           0x413c (413C)
ProductId:          0x2005 (2005)
Revision:           1.4 (0104)
Manufacturer:       DELL
Product:            DELL USB Keyboard
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.4//device:/dev/vboxusb/002/026
Current State:      Busy

ls -lr /dev/vboxusb (after mount attempt):

/dev/vboxusb:
total 0
drwxr-x--- 2 root vboxusers  80 Sep 28 11:55 001
drwxr-x--- 2 root vboxusers 160 Sep 28 11:46 002

/dev/vboxusb/001:
total 0
crw-rw---- 1 root vboxusers 189, 0 Sep 28 11:21 001
crw-rw---- 1 root vboxusers 189, 1 Sep 28 11:21 002

/dev/vboxusb/002:
total 0
crw-rw---- 1 root vboxusers 189, 128 Sep 28 11:21 001
crw-rw---- 1 root vboxusers 189, 129 Sep 28 11:21 002
crw-rw---- 1 root vboxusers 189, 152 Sep 28 11:46 025
crw-rw---- 1 root vboxusers 189, 153 Sep 28 11:46 026
crw-rw---- 1 root vboxusers 189, 154 Sep 28 11:46 027

lsusb (after mount attempt):

Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 0000:0000  
Bus 002 Device 027: ID 0461:4d81 Primax Electronics, Ltd 
Bus 002 Device 025: ID 050d:3201 Belkin Components F1DF102U/F1DG102U Flip KVM
Bus 002 Device 026: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
Bus 002 Device 003: ID 0424:2524 Standard Microsystems Corp. USB MultiSwitch Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 0000:0000

And for reference, once the drive has been mounted (in linux, not the guest) the following shows up as expected: VBoxManage list usbhost (after mount in host):

UUID:               e05987b1-c5ad-4cb7-b0da-749a4f00e69b
VendorId:           0x090c (090C)
ProductId:          0x1000 (1000)
Revision:           17.0 (1700)
Manufacturer:       General
Product:            USB Flash Disk
SerialNumber:       2811060000056025
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3//device:/dev/vboxusb/001/003
Current State:      Busy

lsusb (after mount in guest):

Bus 001 Device 004: ID 090c:1000 Feiya Technology Corp. Flash Drive

Please let me know if there's anything I can do to help fix this.

comment:5 Changed 18 months ago by michael

Your best bet is probably running VirtualBox with the environment variable "VBOX_USB=usbfs" set for all components you start (VirtualBox, VBoxManage, VBoxHeadless etc).

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use