How to recognize USB devices in Virtualbox running on a Linux host?

Marco Sulla picture Marco Sulla · Nov 16, 2013 · Viewed 380.8k times · Source

I tried to use USB devices without any success. It seems they are not detected by Virtualbox itself, since if I select the guest from the Virtualbox home (I'm using a Windows XP 3 guest), choose Settings -> USB -> Add filter from device, no devices is listed, even if an USB pen is attached and recognized by my Lubuntu 13.10. If i run the guest, nothing happens if I attach the device and, as above, no USB device is detected in Devices -> USB devices

I installed the Extensions pack and the Guest additions, so it should work. Please help! I'm using Virtualbox 4.2.16.

Answer

Marco Sulla picture Marco Sulla · Nov 19, 2013

Ok, that's my solution, simplified and improved with the help of vorburger and boechat.

Short answer:

Execute sudo adduser $USER vboxusers, log out and log in again.

Long Answer:

  1. Close virtualbox
  2. Execute in bash (for Debians): sudo adduser $USER vboxusers. If you don't have a Debian-like distro, read here.
  3. Log out and log in again
  4. Attach to your PC the USB devices you want to be automatically mounted in the VM (virtual machine).
  5. Open Virtualbox
  6. Select your VM and go to "Machine" -> "Settings" -> "USB".
  7. Check "Enable USB Controller"; click on the icon with the USB plug and the plus, and click on the devices you want to be automatically mounted in the VM. Click "Ok".
  8. Click on "Start" toolbar button, and ensure your USB devices are recognized and mounted by the VM. Remember that you have to unmount them in the host OS too if you have to disconnect them after you exit the VM.

Note that Extensions Pack and Guest Additions are not strictly required, but with Extension Pack you can use USB 2.0. You have also to enable it under USB settings. Without it all your USB devices are controlled as USB 1.0, so they will work at lower speed.