June 3, 2009

Installing VirtualBox

VirtualBox is an x86 virtualization software package, originally created by German software company Innotek, now developed by Sun Microsystems as part of its Sun xVM virtualization platform. It is installed on an existing host operating system; within this application, additional operating systems, each known as a Guest OS, can be loaded and run, each with its own virtual environment.

To install VirtualBox, go to Virtualbox download site and download the binary file for your operating system. My unit runs on Ubuntu 8.10(Intrepid) so I downloaded the binary file for it.

Before you start using Virtualbox, go to System -> Administration -> Users and Groups. Click the Unlock button in the User Settings dialog box. Type in your password then click the Authenticate button.

Click on Manage Groups button. Scroll down until you see vboxusers. Click vboxusers then click on the Properties button. Check the users to whom you want to give access to Virtualbox. Click the OK button and close the boxes.

Once you attach the Vboxusers group to the users, you need to change the permission to access USB devices. Open a terminal and type:

gksudo gedit /etc/init.d/mountdevsubfs.sh

Add the following lines at the end of the do_start() function:

# #Magic to make /proc/bus/usb work # mkdir -p /dev/bus/usb/.usbfs domount usbfs "" /dev/bus/usb/.usbfs usbfs -obusmode=0700,devmode=0600,listmode=0644 ln -s .usbfs/devices /dev/bus/usb/devices mount --rbind /dev/bus/usb /proc/bus/usb

Then, run the script that you just edited by typing in the terminal:

sudo /etc/init.d/mountdevsubfs.sh start

In order to give users in the vboxusers group write permissions to the devices in /proc/bus/usb, you'll need to edit some rules in /etc/udev/rules.d. Open a terminal and type:

gksudo edit /etc/udev/rules.d/40-permissions.rules

Edit to have the following:

# USB devices (usbfs replacement) SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664", GROUP="vboxusers" SUBSYSTEM=="usb_device", MODE="0664", GROUP="vboxusers"

Then, restart the udev service by typing in the terminal:

sudo /etc/init.d/udev res

Once everything has been done, you can start the Virtualbox by going to Applications -> Systems -> Sun Virtualbox.