How To Use A USB Device In A VirtualBox VM (2027)

Quick answer

  • In the VM’s Settings, open USB and tick Enable USB Controller. Pick OHCI for USB 1.1, EHCI for USB 2.0 or xHCI for USB 3.0, then plug the device in and attach it from the running VM’s Devices, USB menu.
  • Once a guest uses a USB device, the host loses access to it. Detaching a drive that is in use may disconnect it without a proper shutdown and risk data loss.
  • On a Linux host your user must be a member of the vboxusers group. On a Windows host, unplug and reconnect a device after you create a filter for it.

Applies to: Oracle VirtualBox 7.x, Windows and Linux hosts

To use a USB device inside a VirtualBox VM, enable the USB controller in the VM’s settings, then choose the device from the Devices menu while the VM runs. Filters can attach a device automatically every time.

This guide follows the official Oracle VirtualBox User Manual section on USB settings.

If the VM itself is not built yet, see our VirtualBox install and first VM guide.

Table of Contents

USB controller choices

ControllerUSB levelWhat the manual says
OHCIUSB 1.1The basic controller
EHCIUSB 2.0Also enables OHCI
xHCIUSB 3.0Supports all USB speeds

The manual describes xHCI as supporting all USB speeds, so it is the widest choice, but it does not say which controller a particular guest operating system needs.

Turn on USB for the VM

  1. Shut the VM down, select it in VirtualBox Manager and open its Settings.
  2. Open the USB page.
  3. Tick Enable USB Controller.
  4. Choose the USB controller from the list: OHCI, EHCI or xHCI.
  5. Click OK and start the VM.

The USB Support feature must also have been installed with VirtualBox, since it holds the drivers that let guests use USB devices.

Attach a device to the running VM

  1. Plug the USB device into your PC.
  2. In the VM window, open the Devices menu and choose USB.
  3. Click the device you want.

The manual says devices without a matching filter can be passed to the guest manually through this Devices, USB menu.

From that point the guest owns the device and the host no longer has access to it.

Attach a device automatically with a filter

  1. In the VM’s Settings, open USB.
  2. Click the + button to the right of the USB Device Filters window.
  3. Give the filter a name and enter the criteria.
  4. Click OK.
CriterionUse
Vendor and Product IDWritten as hexadecimal vendor:product, for example 046d:c016
Manufacturer and ProductCan be given by name instead of an ID
Serial NumberNeeded to tell identical devices apart
RemoteLocal only, remote only (for example over VRDP), or either

More criteria select fewer devices, and several filters can match one device.

You can switch a filter off by clearing its check box without deleting it.

The manual gives an example filter built from vendor ID 046d, a manufacturer index of 1 and the Remote setting set to not remote.

Use a Serial Number criterion whenever you own two identical devices and only one should attach automatically.

Find a device’s vendor and product ID

The manual says to run this command to list the USB devices VirtualBox sees on the host.

VBoxManage list usbhost

On Windows you can also read the IDs in Device Manager, and on Linux the manual mentions the lsusb command.

Notes for a Windows host

The manual says a kernel-mode driver provides USB support, including a monitor that captures plugged-in devices.

No reboot is needed after the driver is installed, and devices do not need replugging to be claimed.

After you create a filter for a device, though, you must unplug and reconnect the device before the filter works.

Notes for a Linux host

VirtualBox reads USB devices through special files, and those files are made available to the vboxusers group.

Your user must be a member of that group before a guest can see USB devices.

If the device does not show up in the guest

SymptomWhat the manual points to
Device missing from Devices, USBCheck that Enable USB Controller is ticked in the VM’s USB settings
Filter does nothing on WindowsUnplug and reconnect the device after creating the filter
No access on a Linux hostMake sure your user is in the vboxusers group
Host cannot see the deviceThe guest has taken it; detach it from the Devices menu first
Drive disconnected unexpectedlyThe manual warns that an in-use USB hard disk attached to a guest may be disconnected from the host without a proper shutdown, risking data loss

The manual also notes that Oracle Solaris hosts have known USB limitations, and that remote USB devices work through VRDE.

For USB problems on the PC itself rather than in the VM, see our USB ports not working guide.

Official sources

Leave a Reply

Your email address will not be published. Required fields are marked *