2021年12月30日 星期四

How to set up USB for Virtualbox?

How to set up USB for Virtualbox?


1. Install Extension Pack

  For USB 2.0 and USB 3.0 we need to install the free (but closed source) VirtualBox Extension Pack from the VirtualBox download page

  

2. Become a "vboxuser" in Host machine (local machine)

To be able to get access to an attached USB device, the Ubuntu host user needs to be in the vboxusers group. Add your user to this group by running the following command


sudo usermod -aG vboxusers <username> 


and reboot or logout/login.


3. Activate USB support in VirtualBox Manager


Shut down your virtual machine and open USB settings in the VirtualBox Manager. Tick Enable USB Controllerand USB 2.0 (EHCI) Controller or USB 3.0 (xHCI) Controller.


Suggestion: using USB 2.0 (EHCI) Controller


4. Select host USB device for access from the guest

To grant access to USB devices we need to select a device to disable in the host and to enable in the guest (this is a precaution to avoid simultaneous access from host and guest). This can be done from the panel Devices menu or by right mouse click in the bottom panel of the VirtualBox Manager on the USB icon:


Tick the device you need in the guest, untick it if you need it in the host. If you can't see your USB device in that list, it means that VirtualBox cannot access your host USB devices. Make sure your user is added to the vboxusers group and that you restarted your host.


The selected device will immediately be accessible from the guest.


Refer to : https://askubuntu.com/questions/25596/how-to-set-up-usb-for-virtualbox