Wednesday, 23 February 2011

Enabling USB Support in VirtualBox for Ubuntu

Unfortunately, I still need Windows.  There are a few applications that won't work properly on WINE in Ubuntu (iTunes and Rosetta Stone to name two)...  So I use VirtualBox to boot Windows XP inside Ubuntu.

Here's the problem: there's no native USB support in VirtualBox.  This makes the whole virtual system just useless.  If you install the virtualbox-ose package from the Ubuntu repositories you will face this problem. The solution is to install virtualbox-4.0 from www.virtualbox.org.  Here's how:

This procedure was tested on Ubuntu 10.10 Maverick using a Windows XP Pro SP3 virtual machine.  The virtualbox started out as virtualbox-ose 3.2.8-dfsg-2ubuntu1 and ended up as Oracle virtualbox-4.0.4-70112~Ubuntu~Maverick.

*Don't worry about your existing virtualbox machines.  The install procedure outlined below is turnkey and  your machines will roll over unharmed to the upgraded application.*

1. Add the virtualbox.org repository

sudo gedit /etc/apt/source.list
Add the appropriate repository relative to your linux distribution
deb http://download.virtualbox.org/virtualbox/debian maverick contrib
deb http://download.virtualbox.org/virtualbox/debian lucid contrib
deb http://download.virtualbox.org/virtualbox/debian karmic contrib
deb http://download.virtualbox.org/virtualbox/debian jaunty contrib
deb http://download.virtualbox.org/virtualbox/debian intrepid contrib
deb http://download.virtualbox.org/virtualbox/debian hardy contrib

Get the Oracle public key:
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

Upgrade virtualbox:
sudo apt-get update
sudo apt-get install virtualbox-4.0

2. Install the VirtualBox Extension Pack

You can grab it here or from the VirtualBox.org downloads page if the address has changed.  Virtualbox manager will open and ask if you wish to install the extension pack (yes).

3. Enable USB support

Add the current user (or whichever user will be running the virtual machine) to the vboxusers group.  You can do this graphically by System > Administration > Users and Groups.  Select the desired user and click Manage Groups.  Scroll to vboxusers, select Properties and add the desired user.



Next, open virtualbox manager if not already open.  You should be able to do this via Gnome Menu > System Tools > Oracle VirtualBox Manager or by launching virtualbox.  Select the machine in question, scroll to USB and enable.  You may need to install a generic usb driver to get the ball rolling.  

Next time you boot the virtual machine, simply right click the USB icon in the lower right hand corner to enable.

 

Finally, USB support for Windows programs in Ubuntu... now that wasn't so hard lol.

  © Blogger template 'Isolation' by Ourblogtemplates.com 2008

Back to TOP