I cannot see any USB devices within my VirtualBox guest VMs from my host. How do I enable access for my guest VMs?
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>
$ 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.
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.
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
...
vboxusers
group?
Commented
May 14, 2014 at 22:58
sudo adduser USERNAME vboxusers
to add USERNAME to the vboxusers group as suggested by the same second link slm provided. (Syntax adduser [options] user group
),
I changed the following and that worked for me
Make sure that the extension pack is installed In VirtualBox in the settings of the VM Go to Ports and then to USB (based on a Macbook) Enable USB controller Enable USB 2.0 controller And this did the trick: add an empty filter (on the right there's a button for it)
Without the empty filter USB was not recognized in the VM But once I added an empty filter USB works fine now.
This may be useful sometimes. Though not related directly to the question above, this may be a follow up issue once USB is detected in VirtualBox but not shown in guest os.
I followed many blogs to make my USB enabled on Virtual Box (~5.0.28?) on Mac for Windows 7 Pro.
1.I did install the same compatible extension pack for USB for virtualbox 2. Enabled USB 3.0 in Virtual Box Manager (Tried 2.0 though I was sure I had 3.0 port/usb) 3. Ejected USB from native OS (Mac OSX) 4. Tried with enabling filter from Virtual Box Manager (also tried to manually select the USB from the usb listed at the bottom of virtual box) 5. From Device Manager I tried to detect it but the driver search failed. (Network was working and no firewall)
Now my usb was detected (given you did the first part above as well)
NOTE: I also installed VirtualBox Guest Additions for share between mac/windows but don't think its related.
Try this..I'm using Fedora 25 as virtual guest in VirtualBox v 5.1.16.
At guest OS terminal ..
[root@localhost]# dnf install fedora-upgrade
[root@localhost]# dnf upgrade
[root@localhost]# dnf update kernel*
[root@localhost]# dnf install gcc kernel-devel kernel-headers dkms make bzip2 perl
[root@localhost]# reboot
Then install VirualBox Guest additions, log off and log in back.
USB is able to detect for me after executing below command at admin prompt:
[root@localhost]# usermod -a -G vboxsf <User Name>
[root@localhost]# dnf clean all
Then log off and log in back, And navigate to menu bar Devices -> USB -> add USB by selecting
Sometimes a Reboot of guest OS may require..
The suggestion in the comment by Vitaly Zdanevich (Apr 7 '18 at 7:41) below the accepted answer works for me:
I found that VBoxManage list usbhost shows my USB only with sudo.
After installing the extension pack sudo apt install virtualbox-ext-pack
for USB2/USB3 support and launching VirtualBox with sudo and user environment shows the available USB devices in preferences and VM window menu.
sudo -i -u $user virtualbox
Replace $user with your user name.
For detailed information about detected host USB devices type sudo vboxmanage list usbhost
.