sodcalculator

10 Tech How-To

USB Setup on VirtualBox Oracle: Step-by-Step

Guide 10-53258 · Updated · Step by step

This guide walks you through enabling USB support in Oracle VirtualBox so a guest operating system (like Windows, Linux, or macOS) can use USB devices connected to your host—flash drives, external hard disks, printers, webcams, and more. You’ll need VirtualBox installed and a guest VM already created, plus the VirtualBox Extension Pack (free for personal use) and the Guest Additions installed inside the guest.

What You’ll Need

  • Oracle VirtualBox installed on your host (Windows, macOS, or Linux).
  • The VirtualBox Extension Pack, which adds USB 2.0/3.0 support. Download it from the official VirtualBox website—match the version exactly to your VirtualBox version.
  • Your guest VM already created (any OS).
  • Administrator/root access to your host to install the Extension Pack and modify USB settings.
  • VirtualBox Guest Additions installed inside the guest (for better USB passthrough and performance).

Step-by-Step

  1. Install the Extension Pack. Open VirtualBox on your host. Go to File > Preferences (or Tools > Extension Pack Manager in newer versions). Click the puzzle-piece icon, then the Add button (a plus sign). Browse to the downloaded .vbox-extpack file, select it, and confirm the installation. Accept the license when prompted. You may need admin rights on Windows or sudo on Linux/macOS.
  2. Verify the Extension Pack is active. After installation, you should see it listed with its version. If not, repeat step 1 or check that you downloaded the correct version for your VirtualBox build.
  3. Enable USB controller in the VM settings. Select your guest VM in the VirtualBox Manager, click Settings (gear icon), then go to USB. Check the box Enable USB Controller. Choose the USB version: USB 1.1 (OHCI) for very old devices, USB 2.0 (EHCI) for most devices, or USB 3.0 (xHCI) for newer hardware. USB 3.0 is backward-compatible but requires the Extension Pack. If you’re unsure, pick USB 2.0 for stability.
  4. Add a USB filter (optional but recommended). In the same USB settings, click the Add Filter button (the plus icon with a USB symbol). You can add a filter for a specific device that is currently connected to the host—it will appear in the drop-down list. Or create an empty filter and fill in Vendor ID, Product ID, etc., later. Filters let the guest automatically grab the device when it’s plugged in, even if the VM is already running.
  5. Install Guest Additions in the guest OS. Start the VM. In the VirtualBox menu bar, click Devices > Insert Guest Additions CD image…. Inside the guest, run the installer (Windows: VBoxWindowsAdditions.exe; Linux: run VBoxLinuxAdditions.run; macOS: run the .pkg). Reboot the guest when prompted. Guest Additions improve USB passthrough, especially for USB 3.0.
  6. Attach the USB device. With the VM running, plug the USB device into your host. Wait a few seconds for the host to recognize it. Then, in the VirtualBox VM window, go to Devices > USB and select your device from the list. It will detach from the host and attach to the guest. You should see a notification in the guest OS that a new device is connected.
  7. Test the device. Open the guest’s file explorer or device manager to confirm the device appears. For a flash drive, it should show up as a removable disk. For a webcam, it should be listed under imaging devices. If it doesn’t appear, try the troubleshooting steps below.

Common Mistakes

  • Not installing the Extension Pack. Without it, VirtualBox only supports USB 1.1, which is too slow for most devices and may not work at all for modern hardware.
  • Wrong Extension Pack version. The Extension Pack must exactly match your VirtualBox version. If they differ, installation fails or USB devices misbehave.
  • Forgetting to enable the USB controller. Even with the Extension Pack, the VM’s USB controller is disabled by default. You must check the box in the VM settings.
  • Using USB 3.0 with an older guest OS. Some older guests (e.g., Windows XP) lack drivers for xHCI. Use USB 2.0 for such guests.
  • Not installing Guest Additions. Guest Additions provide essential drivers for USB passthrough, especially for USB 3.0. Skipping this step often leads to the device not being recognized.
  • Plugging the device in before the VM is running. If the host has already claimed the device, the guest may not see it unless you use a filter or explicitly attach it via the Devices menu.

Tips

  • Use USB filters for automatic attachment. Create a filter for a specific device (by Vendor ID and Product ID) so it’s automatically attached when the VM starts, even if you plug it in later.
  • Prefer USB 2.0 for compatibility. Unless you need high-speed transfer (e.g., external SSD), USB 2.0 (EHCI) is more stable across different guests and devices.
  • Keep VirtualBox and Extension Pack updated. Newer versions fix bugs and improve USB support. Always upgrade both together.
  • If a device doesn’t work, try a different USB port. Some host controllers have quirks; switching from a front to a rear port can help.
  • For Linux hosts, ensure your user has permission to access USB devices. If you get permission errors, add your user to the vboxusers group (on Debian/Ubuntu: sudo usermod -aG vboxusers $USER), then log out and back in.

Troubleshooting

  • USB device not listed in the Devices menu. First, check that the Extension Pack is installed (File > Preferences > Extensions). Then, ensure the USB controller is enabled in VM settings. If the device is still missing, try unplugging and replugging it, or restart the VM.
  • Device attached but not recognized by the guest. This usually means the guest lacks drivers. Install Guest Additions, or install the device’s own drivers inside the guest. For example, a printer may need its manufacturer driver.
  • Error: “Failed to attach the USB device” or “USB device busy”. The host is still using the device. Close any host applications that might be using it (e.g., file managers, backup software). Also, try attaching the device after the VM has fully booted, not during startup.
  • USB 3.0 devices are slow or not working. Try switching the VM’s USB controller to USB 2.0. If that works, the issue is likely the xHCI driver in the guest. Update the guest’s USB 3.0 drivers or install Guest Additions (which include xHCI drivers for Windows).
  • After installing the Extension Pack, VirtualBox won’t start. This can happen if the Extension Pack version doesn’t match. Uninstall it (via Preferences > Extensions, select and remove) and reinstall the correct version. Restart VirtualBox.
  • On Linux host, USB devices are visible but have permission errors. Add your user to the vboxusers group as mentioned above. Also, check that your system’s udev rules allow VirtualBox to access USB devices. The Extension Pack install usually sets these up, but a custom udev rule may interfere.

Frequently Asked Questions

Q: Can I use USB devices without the Extension Pack?
A: Yes, but only USB 1.1 devices. Most modern devices (flash drives, phones, printers) require USB 2.0 or 3.0, so the Extension Pack is essential.

Q: Is the Extension Pack free?
A: Yes, for personal use. It’s free under the VirtualBox Personal Use and Evaluation License. Commercial use requires a paid license.

Q: Why does my USB device work on the host but not in the guest?
A: The device is probably being claimed by the host. Use the Devices > USB menu to attach it to the guest, or create a filter so the guest grabs it automatically.

Q: Can I attach multiple USB devices at once?
A: Yes, you can attach several devices, but performance may degrade. The number of simultaneous devices depends on your host’s USB controller and the VM’s resources.

Q: Does USB passthrough work for USB 3.0 on older VirtualBox versions?
A: USB 3.0 support was added in VirtualBox 5.0. If you have an older version, upgrade to get xHCI support.

Q: My USB device is recognized but disconnects randomly. What can I do?
A: Try a different USB port, disable power saving for USB in the host OS, and ensure the guest has the latest drivers. Also, check that the USB cable is not faulty.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →