Page 1 of 1

Lost USB Devices [FIXED]

Posted: 21. Feb 2017, 23:36
by tcostigl
My USB devices are suddenly not showing up in VirtualBox. My system host OS is Ubuntu 16.04. Externsions and Guest Additions are installed.

Code: Select all

$ VBoxManage --version
5.0.32_Ubuntur112930

Code: Select all

$ groups
... vboxusers ...

Code: Select all

$ VBoxManage list usbhost
Host USB Devices:

<none>

Code: Select all

$ sudo VBoxManage list usbhost
Host USB Devices:

UUID:               4f650af0-09b7-48dc-8283-f1a80522edd2
VendorId:           0x046d (046D)
ProductId:          0xc018 (C018)
Revision:           67.1 (6701)
Port:               3
USB version/speed:  2/Low
Manufacturer:       Logitech
Product:            USB Optical Mouse
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.4//device:/dev/vboxusb/003/007
Current State:      Busy

... Lots more
Anyone have an idea what happened?

Re: Lost USB Devices

Posted: 21. Feb 2017, 23:49
by socratis
tcostigl wrote:
5.0.32_Ubuntur112930
You are using the Ubuntu forked version of VirtualBox. Uninstall/purge all current VirtualBox modules and download the one from the official VirtualBox: https://www.virtualbox.org/wiki/Downloads

Otherwise you can ask at the Ubuntu forums, since it's their fork.

Re: Lost USB Devices

Posted: 22. Feb 2017, 00:23
by tcostigl
Okay, I uninstalled and purged the Ubuntu version. Then I manually removed the kernel modules from /lib/modules/4.4.0-63-generic/kernel/ubuntu/vbox.

Code: Select all

$ VBoxManage --version
5.1.14r112924
Installed the 5.1.14 extension pack and removed the old guest additions and installed the latest. The guest is Windows 7.

Still no USB devices listed.

Re: Lost USB Devices

Posted: 22. Feb 2017, 00:39
by socratis
Excellent. Now, follow the steps below. Exactly. Not everything might apply to you. If there is a failure, please state exactly which step failed:
  1. Make sure that the Extension Pack is installed on the host. The same version as VirtualBox.
  2. Make sure that at least USB2 (EHCI) is enabled in your VM settings. If your guest supports USB3 (xHCI), use that. For WinXP and Win7 guests (which do not support USB3 natively) follow the steps below:
    1. WinXP: you need to install the Renesas drivers in your Windows XP guest. The instructions are here.
    2. Win7: you need to install the Intel drivers in your Windows 7 guest. The drivers can be downloaded from here.
  3. Create a USB filter in your guest settings while the device is plugged in the host. Delete all values except Name, VendorID and ProductID. Check also http://www.linux-usb.org/usb.ids to make sure that you have the numbers correct. It may not be there if no one bothered to notify them.
  4. Unplug the device.
  5. Start your guest (the one that you applied the filter to). Let it start completely. Log in if you have to.
  6. Plug your device. The filter should capture it and pass control to your guest. You might get a "New hardware found" wizard on the guest, that's normal.
  7. With the USB device plugged in and the VM not running, post the output of the following commands:
    • 
      VBoxManage list usbhost
      VBoxManage list usbfilters
      VBoxManage list extpacks
      VBoxManage showvminfo "Your_Virtual_Machine_Name"
Troubleshooting
  1. If the device shows up in your host and is not captured by the filter, either the filter is incorrect, or there might be a problem with your filter installation.
  2. If the device shows up, but as "Unavailable", eject it from your host (if you can), but leave it plugged in. It should show up as available.
  3. On Linux guests, post the output of "lsusb". On Mac guest check the "System Information". On Windows, check the device manager, or get USBDeview, or USBView.
  4. If on a Linux host, are you a member of the 'vboxusers' group? If not, add yourself with "sudo usermod -a -G vboxusers <your_username>", then reboot.
  5. If on a Linux host, run "sudo update-usbids".

Re: Lost USB Devices

Posted: 22. Feb 2017, 00:40
by Perryg
Post th4e results of id from the hosts terminal.

Re: Lost USB Devices

Posted: 22. Feb 2017, 02:30
by tcostigl
My Linux host supports USB 3. I installed the Intel Driver for Windows 7. My devices aren't even showing up in the host:
Screenshot from 2017-02-21 19-08-23.jpg
Screenshot from 2017-02-21 19-08-23.jpg (77.52 KiB) Viewed 11924 times
I added an empty filter.

Code: Select all

tc@euclid:~$ VBoxManage list usbhost
Host USB Devices:

<none>

tc@euclid:~$ VBoxManage list usbfilters
Global USB Device Filters:

<none>

tc@euclid:~$ VBoxManage list extpacks
Extension Packs: 1
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      5.1.14
Revision:     112924
Edition:      
Description:  USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module:  VBoxVRDP
Usable:       true 
Why unusable: 
tc@euclid:~$ VBoxManage showvminfo Windows
Name:            Windows
Groups:          /
Guest OS:        Windows 7 (64-bit)
UUID:            d7318708-a5ce-4715-a490-f8a2723e32c8
Config file:     /home/tc/VirtualBox VMs/Windows/Windows.vbox
Snapshot folder: /home/tc/VirtualBox VMs/Windows/Snapshots
Log folder:      /home/tc/VirtualBox VMs/Windows/Logs
Hardware UUID:   d7318708-a5ce-4715-a490-f8a2723e32c8
Memory size:     4096MB
Page Fusion:     off
VRAM size:       103MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  2
PAE:             on
Long Mode:       on
Triple Fault Reset: off
APIC:            on
X2APIC:          off
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): HardDisk
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: HyperV
State:           running (since 2017-02-22T00:05:38.359000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Default Frontend: 
Storage Controller Name (0):            SATA
Storage Controller Type (0):            IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  30
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
SATA (0, 0): /home/tc/VirtualBox VMs/Windows/Windows.vdi (UUID: 486bf9ba-6f3c-49f0-86db-4ede43361bb3)
SATA (1, 0): /usr/share/virtualbox/VBoxGuestAdditions.iso (UUID: faa3e570-372b-4feb-ba78-3a625dea1d63)
NIC 1:           MAC: 080027C36239, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1:          I/O base: 0x03f8, IRQ: 4, disconnected
UART 2:          I/O base: 0x02f8, IRQ: 3, disconnected
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: PulseAudio, Controller: HDA, Codec: STAC9221)
Clipboard Mode:  Bidirectional
Drag and drop Mode: disabled
Session name:    GUI/Qt
Video mode:      1867x1009x32 at 0,0 enabled
VRDE:            disabled
USB:             disabled
EHCI:            disabled
XHCI:            enabled

USB Device Filters:

Index:            0
Active:           yes
Name:             New Filter 1
VendorId:         
ProductId:        
Revision:         
Manufacturer:     
Product:          
Remote:           
Serial Number:    

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:  

Name: 'tc', Host path: '/home/tc' (machine mapping), writable

VRDE Connection:    not active
Clients so far:     0

Video capturing:    not active
Capture screens:    0
Capture file:       /home/tc/VirtualBox VMs/Windows/Windows.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25

Guest:

Configured memory balloon size:      0 MB
OS type:                             Windows7_64
Additions run level:                 3
Additions version:                   5.1.14 r112924


Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2017/02/22 00:05:42 UTC)
Facility "VirtualBox System Service": active/running (last update: 2017/02/22 00:05:45 UTC)
Facility "VirtualBox Desktop Integration": active/running (last update: 2017/02/22 00:05:48 UTC)
Facility "Seamless Mode": active/running (last update: 2017/02/22 00:05:42 UTC)
Facility "Graphics Mode": active/running (last update: 2017/02/22 00:05:42 UTC)

Code: Select all

tc@euclid:~$ id
uid=1000(tc) gid=1000(tc) groups=1000(tc),4(adm),24(cdrom),27(sudo),29(audio),30(dip),46(plugdev),115(lpadmin),131(sambashare),135(vboxusers),142(wireshark),1001(android),1003(android-sdk)
Listing the host usb devices only works as root.

Code: Select all

tc@euclid:~$ VBoxManage list usbhost
Host USB Devices:

<none>

tc@euclid:~$ sudo VBoxManage list usbhost
Host USB Devices:

UUID:               0cfe1bb3-afc7-44c5-b84e-ec0991f6803b
VendorId:           0x8087 (8087)
ProductId:          0x07dc (07DC)
Revision:           0.1 (0001)
Port:               8
USB version/speed:  2/Full
Manufacturer:       Intel Corp.
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-9//device:/dev/vboxusb/003/008
Current State:      Busy

UUID:               e1b7ffd6-e331-4197-8fc7-c2e4315a6a2a
VendorId:           0x13fe (13FE)
ProductId:          0x4200 (4200)
Revision:           1.16 (0116)
Port:               3
USB version/speed:  2/High
Manufacturer:               
Product:            USB DISK 2.0
SerialNumber:       070C567E0C13FD62
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4//device:/dev/vboxusb/003/004
Current State:      Busy

UUID:               44352b00-9bb2-4662-9308-cc5cfd607b4a
VendorId:           0x111d (111D)
ProductId:          0x0000 (0000)
Revision:           17.0 (1700)
Port:               1
USB version/speed:  2/High
Manufacturer:       CENTON
Product:            DS Pro
SerialNumber:       AA00000000001709
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2//device:/dev/vboxusb/003/012
Current State:      Busy

UUID:               92e2ffb9-1166-4486-ab98-27a1593fb9bc
VendorId:           0x0bda (0BDA)
ProductId:          0x573c (573C)
Revision:           57.2 (5702)
Port:               10
USB version/speed:  2/High
Manufacturer:       CN0Y2TKG7248751OA36BA00
Product:            Integrated_Webcam_HD
SerialNumber:       200901010001
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-11//device:/dev/vboxusb/003/009
Current State:      Busy

UUID:               b27c384f-bf8b-4844-90f6-7089da9ee05f
VendorId:           0x04f3 (04F3)
ProductId:          0x21f9 (21F9)
Revision:           17.17 (1717)
Port:               5
USB version/speed:  2/Full
Manufacturer:       ELAN
Product:            Touchscreen
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-6//device:/dev/vboxusb/003/006
Current State:      Busy

UUID:               7e683818-488e-4654-837a-ae06021552af
VendorId:           0x046d (046D)
ProductId:          0xc318 (C318)
Revision:           85.1 (8501)
Port:               2
USB version/speed:  2/Full
Manufacturer:       Logitech
Product:            Logitech Illuminated Keyboard
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.3//device:/dev/vboxusb/003/005
Current State:      Busy

UUID:               078e7bc5-555c-4646-abf9-c7a42bd40422
VendorId:           0x046d (046D)
ProductId:          0xc018 (C018)
Revision:           67.1 (6701)
Port:               3
USB version/speed:  2/Low
Manufacturer:       Logitech
Product:            USB Optical Mouse
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.4//device:/dev/vboxusb/003/007
Current State:      Busy

Running VirtualBox as root shows all my USB devices in the guest. I am a member of the vboxusers group as can be seen from the output of id. Here is a listing of the /dev/vboxusb directory:

Code: Select all

tc@euclid:~$ ls /dev/vboxusb -lR
/dev/vboxusb:
total 0
drwxr-x--- 2 root vboxusers 180 Feb 21 19:06 003

/dev/vboxusb/003:
total 0
crw-rw---- 1 root vboxusers 189, 259 Feb 21 17:55 004
crw-rw---- 1 root vboxusers 189, 260 Feb 21 17:55 005
crw-rw---- 1 root vboxusers 189, 261 Feb 21 17:55 006
crw-rw---- 1 root vboxusers 189, 262 Feb 21 17:55 007
crw-rw---- 1 root vboxusers 189, 263 Feb 21 17:55 008
crw-rw---- 1 root vboxusers 189, 264 Feb 21 17:55 009
crw-rw---- 1 root vboxusers 189, 267 Feb 21 19:06 012
Any ideas?

Re: Lost USB Devices

Posted: 22. Feb 2017, 02:41
by Perryg
Running VirtualBox as root shows all my USB devices in the guest. I am a member of the vboxusers group as can be seen from the output of id. Here is a listing of the /dev/vboxusb
There is the confusing part. Adding yourself to the vboxusers group negates the need to run as root. Saying that did you run VirtualBox in root? If so that would probably messed up the setuid and you might need to look and fix it if so.

Re: Lost USB Devices

Posted: 22. Feb 2017, 03:32
by tcostigl
Perryg wrote: There is the confusing part. Adding yourself to the vboxusers group negates the need to run as root. Saying that did you run VirtualBox in root? If so that would probably messed up the setuid and you might need to look and fix it if so.
I ran as root because of a hunch that it might fix the problem. I imported the machine file from my regular user. It did fix the problem, but running as the regular user is not showing the USB devices.

Code: Select all

tc@euclid:~$ ls -l /usr/bin/VirtualBox 
lrwxrwxrwx 1 root root 4 Jan 16 13:20 /usr/bin/VirtualBox -> VBox
tc@euclid:~$ ls -l /usr/bin/VBox 
-rwxr-xr-x 1 root root 4589 Jan 16 13:20 /usr/bin/VBox
No setuid there. I thought it doesn't need it though?

Re: Lost USB Devices

Posted: 22. Feb 2017, 04:36
by socratis
There is another discrepancy here. In your VM information you have a USB filter. An empty one (big mistake), but a filter nonetheless:
tcostigl wrote:
USB Device Filters:

Index:            0
Active:           yes
Name:             New Filter 1
Which is not in accordance with the picture you attached. In the picture there is no filter, whatsoever. What's going on here?

Perryg is the Linux guru, but my advice would be to uninstall/purge everything and start afresh. Do NOT use root for anything. VirtualBox is running on the user context. So if you log in or run it as root you will NOT see the user's VMs. Being root as far as VirtualBox is concerned is not only useless, it's dangerous.

Re: Lost USB Devices

Posted: 22. Feb 2017, 05:13
by tcostigl
socratis wrote:There is another discrepancy here. In your VM information you have a USB filter. An empty one (big mistake), but a filter nonetheless:
tcostigl wrote:
USB Device Filters:

Index:            0
Active:           yes
Name:             New Filter 1
Which is not in accordance with the picture you attached. In the picture there is no filter, whatsoever. What's going on here?
Correct. That picture was meant to show that when I clicked the button to add a filter based on an existing USB device, none were listed. I added the empty filter afterwards (so not shown in the screenshot) because I wasn't sure if that is what socratis meant, since a specific device filter wasn't an option for me at that point in the instructions. But whether that filter is there or not does not make a difference. I have started the machine with and without it. But even before starting the machine, VB should recognize the USB devices present on the host to start with, which it is not.

Perryg is the Linux guru, but my advice would be to uninstall/purge everything and start afresh. Do NOT use root for anything. VirtualBox is running on the user context. So if you log in or run it as root you will NOT see the user's VMs. Being root as far as VirtualBox is concerned is not only useless, it's dangerous.
I agree. I have never ran as root before today, nor would I consider it, it's just that when I did for troubleshooting purposes, it worked as expected. I have had no trouble with USB devices in a regular user setup with VB 5.0.14 about a month ago; I only noticed it today, when I needed to use the USB feature for the first time since then. My VM settings are in my regular user's home directory. To run as root I just opened it from his directory. Maybe an Ubuntu update or new kernel broke something? After I noticed it wasn't working today I started uninstalling, upgrading, downgrading etc. I am mildly certain I have a clean install, but if not, how would I purge every trace of VB and start fresh (not my VM of course)?

Re: Lost USB Devices

Posted: 22. Feb 2017, 05:21
by socratis
I'm not a real expert on Ubuntu, but I believe Synaptic makes it easy to remove/purge every VBox* package. Take a look also at: http://askubuntu.com/questions/187888/w ... pplication

Re: Lost USB Devices

Posted: 22. Feb 2017, 15:11
by Perryg
I'm not sure that purging and installing will fix this issue. I believe from what I have seen so far it is a permission issue and that fix will be on the host. To tell the truth I have not seen this for years and am trying my best to remember how to fix this but it should be the users home env that needs repairing. Clearly the vboxusers group is not doing what it is intended to do and that would be where I would focus my attention. Purging would not remove and recreate this group so you would need to do it manually.

IIRC the user had to rest their VBOX_USER_HOME env, usually with export.

Re: Lost USB Devices

Posted: 23. Feb 2017, 23:15
by tcostigl
I erased $HOME/.config/VirtualBox and restarted VirtualBox but it did not fix the issue. However, after that I had an OS kernel update and restarted the computer and now it works. So I can't say which one fixed the problem, but's working.

Thanks for the help.