Start by adding to sources

sudo nano /etc/apt/sources.list
Add the following line to the end of /etc/apt/sources.list
deb natty contrib
add the apt key to the system for VirtualBox repository
wget -q -O- | sudo apt-key add -

Update source list

sudo apt-get update

Install VirtualBox from the newly added repository (we will install the guest additions later as the current repository doesn’t support installing the virtualbox guest additions directly).

sudo apt-get install virtualbox-4.1

(virtualbox-guest-additions will be installed manually later on)

Note: Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade. For Debian it is available in Lenny backports and in the normal repository for Squeeze and later. The dkms package can be installed through the Synaptic Package manager or through the following command:

sudo apt-get install dkms
add a new user with the group vboxusers
sudo useradd -g vboxusers vbox
sudo mkdir /home/vbox
sudo chown vbox:vboxusers /home/vbox

Now download the newest release of phpvirtualbox from

Unzip the phpvirtualbox download to your www root and edit the configuration file config.php to the correct values for the username and password.

The password can be set for the user by running

sudo passwd vbox

You also need to add the file /etc/default/virtualbox and add the line


Now you need to start the vboxweb-service from /etc/init.d/vboxweb-service by running

sudo /etc/init.d/vboxweb-service start

You should now be able to connect to http://<domainname>/phpvirtualbox

The default username and password is admin/admin.

You may also need the Oracle extension pack from Do this by performing


sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.4-74291.vbox-extpack

You may have to restart the computer after installing the extension pack to make it possible to create console sessions.

Install the vboxweb-service as a service run upon boot by performing

sudo update-rc.d vboxweb-service defaults

Now all thats done is create a virtualbox and run it. As for installing the virtualbox guest addons you can do the following in Ubuntu (a ubuntu virtualbox). The download directory for version 4.1.4 iso is:

Now mount the downloaded iso:

mount   -t iso9660 -o loop

now run the VBoxLinuxAdditions

sudo ./

You may need to run:

sudo apt-get install build-essential xorg linux-headers-$(uname -r)

You are done!