The Virtualization Room

Jul 14 2008   10:27PM GMT

Using USB device filters with Sun xVM VirtualBox

Rick Vanover Rick Vanover Profile: Rick Vanover


A virtualization package is ready for prime time when it has a full array of device connectivity between the host and the guest virtual machine (VM). Let’s take a quick look at USB device redirection in Sun xVM VirtualBox 1.6.2.

The USB device functionality has a nice feature that allows a selective mapping of USB devices from the host to the guest. This can be beneficial if you want a USB device (such as a license key) to be available only to the guest VM and not the host, or vice versa. Within the VM’s configuration, you have the option to specify all devices or specified devices to be connected to the guest VM through USB device filters in the properties of the guest VM. These changes must be made offline, and for Windows hosts the VirtualBox USB controller needs to be added with the native driver. Likewise, the USB root hub that arrives via plug-and-play needs to be installed with the driver on the guest VM (which is automatic when guest additions is installed.) The figure below shows a specific device being permitted to be passed to the VM:


The filter icons highlighted on the right side allow the VM to be presented with all USB devices, remove a filter and to add a filter that is based on user entered criteria or a selection among the currently installed devices. The filters are incredibly versatile as you could redirect certain devices by many factors to be available to the guest VM.

When a device is designated to go to the guest VM, it becomes unavailable to the host system. So there may be some practice issues to get used to losing a device when the VM is powered on. One note of caution is that the mouse and keyboard devices, if USB, are inherently made available to both the host and guest. However, if you add a device filter to add the USB mouse to the guest VM, the mouse would be only available to the guest VM.

Likewise, when the VM is powered off, the USB device will arrive back to the host and then be available for use. If snapshots are being used on the VM, the hardware inventory and specific configuration is managed in the snapshot, so USB filters will be deleted if you are reverting to a snapshot made before the filter was made.

Overall, this USB functionality is quite granular and a strong offering for desktop installation. More information on VirtualBox’s USB support can be found in the VirtualBox online user manual.

2  Comments on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.
  • Mike
    VB 1.6.4 I could not get usb devices to work with Vista 32bit host and any guest. VMware even had problems. When I had XP as my host and an earlier version of Virtualbox worked fine so I concluded it was Vista. Tried Googling the problem and permisions helped but still usb problems persisted. Finally I plugged in a cheapo usb hub into my pc and life is good. All my devices work with Virtualbox as long as I plug them into the external hub. I have an EVGA motherboard 1222-CK-NF66 , NVIDIA nForce 650i Ultra. 2 Gig ram, Vista 32bit Ultimate, NVIDIA Geforce 7600GS video. Intel Core 2 6600.
    0 pointsBadges:
  • Rick Vanover
    Interesting scenario. I too, would have not blamed the hypervisor. That is peculiar that the hub 'makes it work'. Maybe next time I give Vista a try, I will run through this scenario.
    20 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: