The steps followed for this installation are:
- Download and installation of Ubuntu Server LTS (current version 12.04.1)
- VirtualBox and dependencies installation (current stable version 4.1.12)
- Phpvirtualbox installation for headless servers (version 4.1-11)
- VirtualBox extension pack installation for VRDP support
- Starting VirtualBox and connecting to Phpvirtualbox web user interface
1.- Download and installation of Ubuntu Server LTS
I decided to use Ubuntu Server LTS as it is stable and does not require the installation of a Desktop environment, which I won't use for my purposes. The server used has a 64 bits CPU, 12GB RAM, and 514GB of hard disk space, what is more than enough to run several virtual machines in parallel.
A fresh Ubuntu Server image can be downloaded from: http://www.ubuntu.com/download/server
Then you can choose to run the ISO from a USB stick or CD-ROM drive. My recommendation is to install only the base system, so we keep the server clean from packages that we won't use. The only extra package I installed was the SSH server so I can access it remotely.
Once finished the installation processes lets also upgrade the Debian packages to the latest version by
running these commands:
$ apt-get update $ apt-get dist-upgrade
As well I setup the hostname and network settings at /etc/hostname and /etc/network/interfaces.
2.- VirtualBox and dependencies installationInstalling Virtualbox with apt-get:
Checking installed packages:
$ apt-get install virtualbox
$ dpkg -l | grep -i virtualbox ii virtualbox 4.1.12-dfsg-2ubuntu0.2 x86 virtualization solution - base binaries ii virtualbox-dkms 4.1.12-dfsg-2ubuntu0.2 x86 virtualization solution - kernel module sources for dkms ii virtualbox-qt 4.1.12-dfsg-2ubuntu0.2 x86 virtualization solution - Qt based user interface
3.- Installing PhpvirtualboxFirst we need to install apache2 and php:
Then we can install Phpvirtualbox, setting the permissions of the directory to your own username (mine is santiago):
$ apt-get install apache2 $ apt-get install php5
Then edit /var/www/phpvirtualbox/config.php and set the username and password for the system user that runs VirtualBox:
$ cd /var/www/ $ wget http://phpvirtualbox.googlecode.com/files/phpvirtualbox-4.1-11.zip $ unzip phpvirtualbox-4.1-11.zip $ chown -R santiago:santiago /var/www/phpvirtualbox/ $ cp /var/www/phpvirtualbox/config.php-example /var/www/phpvirtualbox/config.php
var $username = 'santiago'; var $password = 'yourpassword';
4.- VirtualBox extension pack installation for VRDP supportInstalling the extension pack will allow us to control the virtual machines desktop remotely.
wget http://download.virtualbox.org/virtualbox/4.1.12/Oracle_VM_VirtualBox_Extension_Pack-4.1.12.vbox-extpack vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.12.vbox-extpack
5.- Starting VirtualBox and connecting to Phpvirtualbox user interfaceThe following command is used to start VirtualBox web services
Then we can connect to the user interface from our browser at http://yourserverip/phpvirtualbox
$ vboxwebsrv -b
We should be know able to use our fresh installation of VirtualBox.