[SOLVED] Virtualbox - USB <no devices available>

Something happened and the Win7 VM had become corrupt, couldn't boot. So, deleted it and reinstalled Win7 from scratch. Did as you instructed and set up the new VM with USB2.0 support and without any filters:14-01
Install went well, including Guest Additions.

Started off the Win7 VM with a webcam connected to the computer's USB2.0 port:
14-02
The Blue Yeti microphone is also connected to a USB2.0 port and never gets unplugged.

Clicked on the USB icon at the bottom right of the Win7 VM:
14-03
"No USB devices connected." Not even the Blue Yeti was being picked up.

Connected my phone to the computer's USB3.0 port:
14-04
"No USB devices connected."

Thinking that perhaps I should try another method, Kernel 4.17.19 was installed. Looked into Package Manager, and was pleasantly surprised to find that linux417-virtualbox-host-modules 5.2.20 had automatically been installed.

Rebooted into Kernel 4.17.19 without any unnecessary USB devices connected:
17-02
Blue Yeti microphone is still there because it is permanently connected to the rear USB2.0 port of the computer. Also, 2 other devices were connected to USB2.0 ports on the computer.

Fired up the Win7 VM. Clicked the USB icon at the bottom right. "No USB devices connected."

With Win7 VM still running, connected the webcam to USB2.0 port on the computer:
17-03
Result - "No USB devices connected."

Connected my phone to USB3.0 port on the computer:
17-04
Result - "No USB devices connected."

So, the issue isn't kernel-number related. Happens across different kernels.

Back on 4.14.78 now and thinking maybe I'm not destined to back-up my phone. :sweat:

This has been a very frustrating experience on my side, but it is so wonderful how much help is being rendered in this thread. Thank you @bogdancovaciu and @anon23612428

:pray::heart:

1 Like

Let's try to find the issue :slight_smile: and FIX IT :smiley:
Please check from terminal the:
groups
and see if you are in the vboxusers

if not, run this still from terminal:
sudo adduser $xfceman vboxusers
or maybe better
sudo gpasswd -a $xfceman vboxusers
considering that xfceman is your user in that machine too.
Reboot and let's see what is going on.

That sounds like a brilliant idea! :+1::grin:

Output from groups:
network scanner power vboxusers usbmux autologin video storage optical lp disk audio wheel xfceman
I'm already there.

But just in case, I did:

and rebooted the computer. Launched Win7 VM and still same result as before.

Where to next?

ls -la /dev | grep vboxusb
you should have something like this:

if is not so, then edit the /etc/udev/rules.d/60-vboxdrv.rules
and change to this:

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"

reboot and let's see ...

6 Likes
2 Likes

YES!!!! YES YES YESSSSS!!!!!! @bogdancovaciu you're a GENIUS!!! IT WORKS!!! WOOOO!!!!

Thank you, thank you, THANK YOU!!! :star_struck::+1::pray::heart:

Edit: it was a damn pointer issue, but the above solution solved it!

1 Like

Most likely is because i read a lot of tutorials, as the one pointed out by @linux-aarhus ... but i like to take all things step by step, for each particular problem.
Really glad we find the culprit and we FIX IT as we intended :smiley:
Cheers!

2 Likes

I'm going to go through that tutorial once again and see what I missed/skipped. Indeed, it is a learning experience. Thank you once again. And thank you @linux-aarhus for the tutorial link.

1 Like

@bogdancovaciu, perfect solution, but do you know why the udev rule was necessary?
It's completely new to me to need an udev rule for VBox USB devices.

Usually the USB filter in VirtualBox manager should be left empty and devices attached on the fly - when needed.

If you create filters and udev rules it will create problems if you want to access the device from both systems.

Peripheral devices should never be added through filters.

Of course exceptions exist - such as a peripheral which only works in Windows and only is needed from Windows. Such a device could be - but not limited to - a usb-to-serial adapter or an obscure usb-printer with drivers only available from Windows - and yes such devices exist.

Another sample exception could be a backup device which should only be accessed from the virtual machine to ensure it is never written to from the host system.

2 Likes

I might not have the complete technical understanding here, but from what i gather, the default install of virtualbox will install the /usr/lib/udev/rules.d/ 60-vboxdrv.rules that has this content:

KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="root", MODE="0666"
KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root", GROUP="root", MODE="0600"

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

but i don't know why is ignored, and it prefers to use the one from /etc/udev/rules.d/60-vboxdrv.rules with the content i mentioned.
Probably my notes are outdated, but i recall this was the only way to get it working on my end too, also that is why i took the long road and take things step by step in this post.

For me would make more sense to have it as @linux-aarhus mentioned:

but like i said, my technical understanding is quite limited in that regard.

3 Likes

Thank you.
Could this be something recent?
Last time I used a USB device in VBox was when I was updating an iPhone with a MacOS guest, a month ago.
I'll check the rules files on my system.

1 Like

My system (on this machine) has now a bit over one year since installed and runs with no issues. Right back then i had to do this and i kept it this way since ... I connect quite often my tablet on VBox installs, just to test different things, so i use that almost daily. Maybe with the updates i have in testing (since i keep this system on that branch) maybe i can remove the rule from /etc/udev/rules.d/ and see if it will use the one from /usr/lib/udev/rules.d/ :thinking:
I'll do a test and report back ...

1 Like

I am thinking that maybe a section on this issue should be added to the mentioned tutorial?

Trouble shooting section maybe?

2 Likes

Well, i made the test on my end and removed the /etc/udev/rules.d/60-vboxdrv.rules, rebooted the system, opened up VBox and USB is working perfectly without that file.
As i mentioned, i'm on testing and this is VBox
image

plus the Extensions
image

My other machine is on unstable and i have only one VBox install as is not very powerful rig and i don't use it much.
Stable branches i have only on two VM's on this one, but i never tested to install Virtualbox inside a virtualbox installation :slight_smile: to compare the /usr/lib/udev/rules.d/60-vboxdrv.rules between branches ... maybe there is something else to look for?

2 Likes

Seconded. This would be very helpful to newbies like me, considering it happened on a stable branch.

Could you post, out of curiosity, the result of:
cat /usr/lib/udev/rules.d/60-vboxdrv.rules
from your installation to make a comparison to mine?

KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="root", MODE="0666"
KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root", GROUP="root", MODE="0600"

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

Seems to be identical, so the issue is not there ...

Forum kindly sponsored by