Blog

Fix Virtualbox USB Passthrough

Why Virtualbox… why… why do package mantainers do this to us!

Well, guys as usual I post things that annoy me, and how to fix them. So when my horrible memory forgets how to fix a simple issue… I know I can come back to my own notes and ifigure it out again.

So, I’m typing this from my OpenSUSE Tumbleweed, installed Virtualbox from official repos (Package from the website has broken dependencies… figuring that out is more annying than anything…).

As usual, go to your software center, as shown below. And check the following packages are installed.

Yeah yeah, I know what you’re going to say… I tried to install the packages from the website… YES I DID!.

Just make sure the following is installed.

If you’re all good, then you’re missing two probable things. To add yourself to the virtualbox group as will show next, and you’re probably missing a udev rule, ┬áthat i’ll provide or tell you how to symlink it.

Okay as you can see with my user, I’ve added myself to the group.

hpprotumble:/home/ddemuro # cd /etc/udev/rules.d/
hpprotumble:/etc/udev/rules.d # vim 60-vboxdrv.rules
 
#
# COPY THE FOLLOWING TO THAT FILE!.
#
 
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"                                          
#                                                                                                                         
#these lines below give access permission to vboxusers to properly work with usb nodes, but enabling them could be security risk (bnc#664520) !!
#if you can live with this security problem put these lines below in to the new file /etc/udev/rules.d/60-vboxdrv.rules so they will stay enabled also after package update
SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/lib/udev/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"       
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/lib/udev/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/lib/udev/VBoxCreateUSBNode.sh --remove $major $minor"                               
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/lib/udev/VBoxCreateUSBNode.sh --remove $major $minor"

Final step and most important… REBOOT!

You may also like

Leave a Reply

Recent Comments