Using USB 2.0 devices under FreeBSD / VirtualBox

I’ve upgraded my home FreeBSD 8 server’s instance of VirtualBox to 4.1.8, and wanted to play with passing USB devices through from the FreeBSD host to VirtualBox guests. This turns out to be supported in only a limited manner — information here shows how we can ensure USB 1.1 and 1.0 works properly, even though USB 2.0 is not (yet) supported.

Officially USB 2.0 support inside VirtualBox requires the Oracle Extension Pack. This extension pack is generally useless for FreeBSD hosts — it contains a bunch of precompiled binaries for OSes that Oracle officially supports, and FreeBSD is not (currently) a supported OS.

Fortunately, USB 1.1 and 1.0 support is present when running VirtualBox on a FreeBSD host… with one small wrinkle if you plug in a USB 2.0 device — your FreeBSD host will recognise it, VirtualBox will recognise it, and you can arrange for a VM guest to see it. But your guest will not be able to successfully use it.

To the rescue, many hours of googling by this kind soul. Turns out if FreeBSD’s kernel recognises the device as USB 2.0, the pass-through to VirtualBox becomes, ummm….  problematic.

The solution is to force FreeBSD’s kernel to treat all USB devices as being, at best, USB1.1

sysctl hw.usb.ehci.no_hs=1

Your VBox guest will now see your USB2.0 device as USB1.1 — for some devices (like printers) this may be quite sufficient, and make all the difference between having some USB connectivity into your guests or none at all.



  1. Julien · ·

    Then how do I turn back sysct to its original state.

  2. I haven’t tried, but “sysctl hw.usb.ehci.no_hs=0” would be the first thing to try.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: