In order to manage Headless Virtualbox using phpvirtualbox on Ubuntu Server, follow these steps below. I assume you already installed Virtualbox on Ubuntu Server.
Installing phpvirtualbox
First we need to create a new user called vbox and add it to vboxusers group. Use this command to do thisuseradd -m vbox -G vboxusersCreate password for vbox
passwd vboxNow create a new file /etc/default/virtualbox
nano /etc/default/virtualboxand paste this line below into the file
VBOXWEB_USER=vboxNow execute this command to create service and start the service
update-rc.d vboxweb-service defaultsNext we need to install some packages for the phpvirtualbox
/etc/init.d/vboxweb-service start
apt-get install apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apache2 apache2-doc apache2-suexec libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapr1 php5-common php5-mysql php5-suhosin php-pear wgetNow restart Apache2
/etc/init.d/apache2 restartDownload and install phpvirtualbox
cd /var/wwwNow create config.php
wget https://phpvirtualbox.googlecode.com/files/phpvirtualbox-4.2-2.zip
unzip phpvirtualbox-4.2-2.zip
mv phpvirtualbox-4.2-2.zip phpvirtualbox
cd phpvirtualbox
cp config.php-example config.phpNow edit the config.php file and change the password with your vbox user password we created earlier.
/* Username / Password for system user that runs VirtualBox */
var $username = 'vbox';
var $password = 'gamblis';
OK that's it. Now open web browser and type this address to open the phpvirtualbox
http://youripaddress/phpvirtualbox
Change youripaddress with your Ubuntu server IP address. Use admin and password admin to login.