How can I enable access to USB devices within VirtualBox guests?

In order to enable access to these devices you'll need to add your username to the group vboxusers.

$ sudo usermod -a -G vboxusers <username>

Example

$ sudo usermod -a -G vboxusers saml

You can confirm the change afterwards:

$ groups saml
saml : saml wheel vboxusers wireshark

After doing the above you'll want to logout and log back in, so that for the newly added group to get picked up by your user account. Then from the VirtualBox GUI you'll be able to right click on the USB icon in the lower right group of icons, and select whatever USB devices you want to give control over to your running guest VM.

                              ss of VB

Detecting USB devices

You can use VirtualBox's little known command line tool VBoxManage to list out the USB devices that are accessible. This is a good way to also confirm that the group addition made above to your username are being picked up correctly.

Example

without group

$ VBoxManage list usbhost
Host USB Devices:

<none>

with group

$ VBoxManage list usbhost | head -19
Host USB Devices:

UUID:               abcd1234-123a-2345-b1e0-8a0b1c1f2511
VendorId:           0x046d (046D)
ProductId:          0x0809 (0809)
Revision:           0.9 (0009)
SerialNumber:       ABC34567
Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.2/usb1/1-4//device:/dev/vboxusb/001/004
Current State:      Busy

UUID:               d2abc46d-123-1234-b8c3-691a7ca551ce
VendorId:           0x046d (046D)
ProductId:          0xc504 (C504)
Revision:           19.16 (1916)
Manufacturer:       Logitech
Product:            USB Receiver
Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.0/usb3/3-3//device:/dev/vboxusb/003/003
Current State:      Busy
...

References

  • VirtualBox USB support on Fedora. The right way.
  • Set up USB for Virtualbox
  • 3.10.1. USB settings - VirtualBox documentation

Tags:

Usb

Virtualbox