Opened 13 years ago
Closed 10 years ago
#10816 closed defect (obsolete)
VirtualBox USB Broken
Reported by: | dj_bushido | Owned by: | |
---|---|---|---|
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.215389.xyz/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 (6)
comment:2 by , 13 years ago
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:
EDIT: Debug information removed, as it is taking up space and I can't recreate the environment it was run in.
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.
follow-up: 4 comment:3 by , 13 years ago
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 by , 13 years ago
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 by , 13 years ago
Your best bet is probably running VirtualBox with the environment variable "VBOX_USB=usbfs" set for all components you start (VirtualBox, VBoxManage, VBoxHeadless etc).
comment:6 by , 10 years ago
Resolution: | → obsolete |
---|---|
Status: | new → closed |
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.