[Solved] No USB devices detected in Windows guest on Linux host

Discussions related to using VirtualBox on Linux hosts.
Post Reply
rijo79
Posts: 6
Joined: 23. Sep 2018, 19:43

[Solved] No USB devices detected in Windows guest on Linux host

Post by rijo79 »

I've been wrestling with this problem for some time now and still don't have a solution. Today, I've upgraded to the latest Virtualbox Version 5.2.18 r124319 (Qt5.11.1) on Debian testing, updated the extension pack and installed the latest guest additions in the Win 7 guest. I was already in the vboxusers group and tried moving the entry in /etc/group to a new location in the file, as was described in another post on the subject, even though it was not at the end. I also tried making the changes described in another post to /etc/udev/rules.d/60-vboxdrv.rules:
Changing

Code: Select all

SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
to

Code: Select all

SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor vboxusers"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor vboxusers"
then rebooting and there is still no change. No usb devices are detected in virtualbox although the mounted external drive is showing and is writable in the host. It seems that vbox is not being granted access to the USB subsystem but I don't know why. Has anyone found any other solution so to this?
Last edited by socratis on 24. Sep 2018, 05:23, edited 1 time in total.
Reason: Marked as [Solved].
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No USB devices detected in Windows guest on Linux host

Post by socratis »

You reminded me to lock that old "(SOLVED) No USB devices connected after upgrade" thread from 2014. It's not a good idea to follow the advice in an (ancient for software) 4-year old thread.

There should be no need to modify anything in the /etc/group or any 'udev.rules'. Just perform a plain vanilla installation of VirtualBox, make sure there are no errors during the installation and post the output of:
  • 
    VBoxManage list usbhost
If that doesn't work, there was a problem with the installer, look at the logs.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
rijo79
Posts: 6
Joined: 23. Sep 2018, 19:43

Re: No USB devices detected in Windows guest on Linux host

Post by rijo79 »

Ok. Here ya go:

Code: Select all

Host USB Devices:

UUID:               47a214cf-49a4-49ba-bf4c-42ba001c702f
VendorId:           0x1770 (1770)
ProductId:          0xff00 (FF00)
Revision:           1.16 (0116)
Port:               7
USB version/speed:  1/Full
Manufacturer:       MSI EPF USB
Product:            MSI EPF USB
SerialNumber:       MSI EPF USB
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8//device:/dev/vboxusb/001/003
Current State:      Busy

UUID:               d304357b-2029-4ba2-8bc7-16f539678134
VendorId:           0x1058 (1058)
ProductId:          0x0748 (0748)
Revision:           16.16 (1616)
Port:               4
USB version/speed:  2/High
Manufacturer:       Western Digital
Product:            My Passport 0748
SerialNumber:       575848314342314632383132
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5//device:/dev/vboxusb/001/005
Current State:      Busy

UUID:               1352a364-665b-47bb-be62-98e3787062a9
VendorId:           0x0cf3 (0CF3)
ProductId:          0x3004 (3004)
Revision:           0.1 (0001)
Port:               10
USB version/speed:  1/Full
Manufacturer:       Qualcomm Atheros Communications
Product:            AR3012 Bluetooth 4.0
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11//device:/dev/vboxusb/001/004
Current State:      Available
So there's a clue. Its showing the USB devices, including the WD external drive as 'busy'. Its the same whether the drive is mounted or not. No other USB device is plugged in so I don't know how anything is 'busy'...
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No USB devices detected in Windows guest on Linux host

Post by socratis »

Now that's quite a different situation compared to what you described at the beginning, isn't it?
rijo79 wrote:No usb devices are detected in virtualbox
So, at this point, your VirtualBox installation is up and running as it should, wouldn't you agree?

Now, please read the following thread: USB basics and troubleshooting, all of the posts. If you still have a problem after reading through the whole thing, please follow the advice of the last post, #8: Asking for help and post the information requested.

BTW, "Busy" means that the device is in use by the host. That's fine, that's expected. It *is* mounted in the host, isn't it?

Oh, and if you want to use this device in a Win7 guest, and this is a USB3 device, pay special attention to #6: Guest support.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
rijo79
Posts: 6
Joined: 23. Sep 2018, 19:43

Re: No USB devices detected in Windows guest on Linux host

Post by rijo79 »

No, Its still the same situation. The gui is still showing no USB devices. Under Devices -> USB -> USB Settings it says 'No USB devices connected' and in the settings for the vm, under USB, there are no filters and if I try to add one, it says <no devices available>... So it did appear that no devices were detected until I ran the command you showed me and got the output. This doesn't change the original problem though. Its a USB 2 device in a USB 2 port on the machine and in the vm settings, USB 2 is selected. I've read through the page you linked for USB basics and trouble shooting and no luck. I've tried unmounting then unplugging and re-plugging the device with the guest running as well as rebooting the guest with the device plugged in but not mounted (and mounted as well) and nothing is making any difference.
So at this point, it is not up and running as it should as I still cannot open a USB device in the guest...
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No USB devices detected in Windows guest on Linux host

Post by socratis »

No, it's sort of up and running. The VirtualBox backend does indeed see the USB devices in your host, which means that at the most basic level, it works. It's funny (really) that you see the devices from the CLI but not the GUI. I don't recall such a case...

Can you please upgrade your VirtualBox and ExtPack to the latest Test Build? You're on Debian testing after all, you should be using the latest test builds.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
rijo79
Posts: 6
Joined: 23. Sep 2018, 19:43

Re: No USB devices detected in Windows guest on Linux host

Post by rijo79 »

Ah just noticed something... When I ran VBoxManage list usbhost the first time, it was as root (didn't notice that). Running it as normal user gets:

Code: Select all

Host USB Devices:

<none>
So there is evidently a permissions problem... Anyways, here's the output from the commands in the 'asking for help' instructions:

Code: Select all

id
uid=1000(rijo) gid=1000(rijo) groups=1000(rijo),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),106(netdev),110(bluetooth),113(lpadmin),114(scanner)

VBoxManage -version
5.2.18r124319

VBoxManage list extpacks
Extension Packs: 1
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      5.2.18
Revision:     124319
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:

VBoxManage list usbhost
Host USB Devices:

<none>

VBoxManage list usbfilters
Global USB Device Filters:

<none>

VBoxManage showvminfo "Win7"
Name:            Win7
Groups:          /
Guest OS:        Windows 7 (64-bit)
UUID:            5b0a53eb-fb05-4461-afe5-d7c781d2686a
Config file:     /home/rijo/VirtualBox VMs/Win7/Win7.vbox
Snapshot folder: /home/rijo/VirtualBox VMs/Win7/Snapshots
Log folder:      /home/rijo/VirtualBox VMs/Win7/Logs
Hardware UUID:   5b0a53eb-fb05-4461-afe5-d7c781d2686a
Memory size:     2048MB
Page Fusion:     off
VRAM size:       27MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  2
PAE:             off
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): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
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:           powered off (since 2018-09-24T02:52:40.232000000)
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/rijo/VirtualBox VMs/Win7/Win7.vdi (UUID: 2fe2e068-c79d-4637-9897-cee763b8c2df)
SATA (1, 0): /usr/share/virtualbox/VBoxGuestAdditions.iso (UUID: 96e11ca8-a9a4-45dc-9938-304149e5a21f) (passthrough enabled)
NIC 1:           MAC: 0800272104AF, Attachment: Bridged Interface 'enp3s0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
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:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: PulseAudio, Controller: HDA, Codec: STAC9221)
Audio playback:  disabled
Audio capture: enabled
Clipboard Mode:  Bidirectional
Drag and drop Mode: Bidirectional
VRDE:            disabled
USB:             enabled
EHCI:            enabled
XHCI:            disabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:  

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

Capturing:          not active
Capture audio:      not active
Capture screens:    0
Capture file:       /home/rijo/VirtualBox VMs/Win7/Win7.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25
Capture options:    ac_enabled=false

Guest:

Configured memory balloon size:      0 MB
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No USB devices detected in Windows guest on Linux host

Post by socratis »

rijo79 wrote:So there is evidently a permissions problem
I prefer to call it "Membership" problem. Go back to the series of articles that I linked to, and that you already read once. In #2: Capturing a USB device in VirtualBox there's a special NOTE for Linux hosts. Follow it...

Also, there is absolutely no need to run as 'root' a user land program. And especially with VirtualBox, you're going to have problems if you do anything as root. VirtualBox runs in the context of each user, the root has no extra powers, on the contrary.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
rijo79
Posts: 6
Joined: 23. Sep 2018, 19:43

Re: No USB devices detected in Windows guest on Linux host

Post by rijo79 »

Well strange indeed. lol Apparently I was somehow knocked out of the vboxusers group, which I had previously been a member of.. Oh well. Its working now, Thanks for your help..
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No USB devices detected in Windows guest on Linux host

Post by socratis »

Glad you got it going. Marking as [Solved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply