Mount USB drives inside VirtualBox machines

In this article, we would cover how to mount USB drives inside VirtualBox machines. This is made possible through VirtualBox Extension Pack. It provides us the extended functionality which enables the support for USB devices, Remote Desktop Protocol, Host webcam passthrough, PCI Passthrough on Linux hosts etc.

So, we need to first download the relevant package from the official website of VirtualBox. Also note that, following operations would require you to have superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.

Covering the installation steps first

Just do a Google search – “VirtualBox Extension Pack“. The first result (i.e. Downloads – Oracle VM VirtualBox) on the web page is our destination. We need to first check the VirtualBox version we have installed.

To check for the version, launch VirtualBox and Menu bar –> Help –> About VirtualBox. A dialog box opens, wherein we can see the version we have installed. At the time of writing v6.1.34 is available.

So, we need to install the VirtualBox Extension Pack matching with our VirtualBox installed version. Now, on the Downloads web page, search for heading – VirtualBox 6.1.34 Oracle VM VirtualBox Extension Pack. The version could be different for you.

Under it, there would be link mentioning – All Supported Platforms. Click on it to download – Oracle_VM_VirtualBox_Extension_Pack-6.1.34.vbox-extpack

Now, launch VirtualBox and Go to – File –> Preferences –> Extensions. Click on + button at the right, to add new package.

Select the file we have downloaded – Oracle_VM_VirtualBox_Extension_Pack-6.1.34.vbox-extpack. It would prompt us for installation. After clicking on Install button, read the License text and if you are agree then – click on Agree button. Provide the superuser password.

Lastly, we need to add $USER to group vboxusers

sudo adduser $USER vboxusers

where,

adduser – adds the $USER to the Group vboxusers.

And, then reboot or logout to reflect the necessary changes.

Mount USB drives inside VirtualBox machines

With all set, plug in your USB drive. Select the Virtual Machine –> Settings –> USB. Click on + USB button to add a new USB filter. It would show us a list of devices. Click on name of your USB drive. Also, don’t forget to enable USB controller at the top.

Boot your machine, your USB drive would be there inside the Virtual Machine. It is worth mentioning here that, since the USB drive is accessible through guest machine. Therefore, we can’t access it from the host. But, once we close our Virtual Machine the USB drive gets accessible from the host automatically.

In conclusion, we have discussed how to mount USB inside VirtualBox machines.