Howto: Install VirtualBox in Ubuntu Hardy Heron with USB Support in 5 easy Steps!

*update* New Verson of Virtualbox Just released! Click Here!
When I last checked Virtualbox did not update their repositories for Hardy Heron, its not a problem, their is a hardy package without a repository. I have created a howto last year on howto setup VirtualBox completely and to seamlessly integrate windows xp into your ubuntu desktop here

So lets install the brand new virtualbox package for Hardy Heron...

Lets Install the essential build utilities so the vbox kernel module builds.
sudo apt-get install build-essential linux-headers-`uname -r`
Install i386 VirtualBox without repository:
wget ; sudo dpkg -i virtualbox_1.5.6-28266_Ubuntu_hardy_i386.deb
Install amd64 Virtualbox without repository:
wget ; sudo dpkg -i virtualbox_1.5.6-28266_Ubuntu_hardy_amd64.deb

Check Here for updated Virtualbox Packages since the repository isnt added yet

Alternate install with Gutsy repository as some people have suggested works fine, just copy/paste these exact commands into the terminal:
sudo sh -c 'echo "# VirtualBox repository for Ubuntu Gutsy
deb gutsy non-free" \
> /etc/apt/sources.list.d/gutsy-virtualbox.list'
wget -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install virtualbox

Now you Must add your self to the vboxusers group:
sudo adduser $USER vboxusers
Adding user `ionstorm' to group `vboxusers' ...
Adding user ionstorm to group vboxusers

Setup VirtualBox USB Support:
USB is disabled by default, so you'll probably want to enable it. Otherwise you'll get an error when you go into the "Settings" of your virtual machine. To correct this, you'll need to edit the file:
sudo gedit /etc/init.d/
You'll see a block of code that looks like this:
# Magic to make /proc/bus/usb work
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb

Now uncomment the last 4 lines above to look like this:
# Magic to make /proc/bus/usb work
mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

Ok now logoff, then log back in so the vbox driver see's you are logged in to the vboxusers group.

If the above doesnt work try rebooting, if that doesnt enable usb you can try this:
Grab the vboxusers group id:
grep vbox /etc/group

Edit the fstab with the group id # in bold:
sudo gedit /etc/fstab
Append this to the fstab then save/exit:
## usbfs is the USB group in fstab file:
none /proc/bus/usb usbfs devgid=124,devmode=664 0 0

Now lets edit the file with the gid in bold:
sudo gedit /etc/init.d/
Paste the 2 lines below above the line: "# Mount spufs, if Cell Broadband processor is detected"
## Mount the usbfs for use with Virtual Box
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=124,devmode=664

You may not need to reboot, try doing:
sudo /etc/init.d/

If not, reboot, and virtualbox should detect your usb devices!

You can follow my directions here to learn how to integrate Windows XP into your desktop!

Checkout the Official VirtualBox User Manual Here

Clicky Web Analytics