Posts Tagged ‘virtualbox’

Enable USB support in Virtualbox

January 14th, 2011

OK, I only tried a Windows XP client on the Ubuntu 10.10 host. here I’m not sure it will work on other hosts or clients. :-)

I was using Virtualbox OSE which I installed through Ubuntu repository. However, only Virtualbox PUEL supports USB.

So this is what I did:

First, uninstall virtualbox-ose:
sudo apt-get remove virtualbox-ose
. also run
sudo apt-get autoremove
to remove unnecessary dependencies.

Now install virtualbox PUEL version. There are 2 ways:

  • Download .deb package and install it directly. Here is the download page:
  • Add to your repository source list, and install it via
    sudo apt-get install
    . The source url for ubuntu 10.10 isdeb maverick contrib, add the public key via
    wget -q -O- | sudo apt-key add -
    , and install it by
    sudo apt-get update;
    sudo apt-get install virtualbox-4.0

    . The lastest info can be found here:

NOTE: uninstalling virtualbox-ose and reinstalling virtualbox PUEL won’t affect the installed guest machines.

Install VirtualBox Extension Pack to suport USB 2.0. The lastest version is still listed in the download page: Here is the directly link for VirtualBox 4.0.0:

Update guest additions. You can download the guest additions ISO file here: Remember to choose the right version, here I chose 4.0.0.

Now, plugin your usb device, and add a usb filter in your guest machine’s settings. Remember, you have to all these before you turn on your guest machine machine. Maybe you think now everything is done, you boot your guest machine and it will tell you a new device is found. No way!

Refer to for the coming steps.

Create a group “usbfs”
sudo addgroup usbfs
, and add yourself to this group:
sudo usermod -aG usbfs <your accout>

Add this line
none /proc/bus/usb usbfs devgid=1001,devmode=664 0 0
(remember to change the “1001″ to your own group id for “usbfs”!) to the end of the file “/etc/fstab”.

Reboot the host machine (here is ubuntu).

In the reference, it says: *USB DEVICES HAVE TO BE UNMOUNTED BEFORE VIRTUAL MACHINE CAN RECOGNIZE THEM*. However, I didn’t do this and it also worked. So I think with version 4.0.0, it’s not necessary.

Now start the guest machine (here is Winsows XP), it should report new USB devices found.

setting virtualbox networking to allow host & guests communicate

May 21st, 2010

If you use the default  NAT for as your guest machine’s network adaptor, you can access your host from the guests but can’t access the guests from your host. But in the latest version of VirtualBox, it’s very easy to set the networking so that both host and guests can access each other. You only need to set your network adaptor as “bridge” as shown below: