How to install PhpVirtualbox on Ubuntu 14.04 Server – LAMP
PhpVirtualbox is a Php web application where you can manage your virtual machines. it is a great application and similar to the normal desktop gui for virtualbox. so if you have installed Oracle Virtualbox on a headless server and you miss the gui you should definitely install phpvirtualbox.
To complete this guide you have to have ubuntu 14.04 LTS server – LAMP stack and Oracle Virtualbox installed
Step 1. Install Oracle VirtualBox extension pack
So the first thing we should do is to install the extension pack for virtualbox. the extension pack will provide us with following functionalities.
- The virtual USB 2.0 (EHCI) device
- Host webcam passthrough
- Intel PXE boot ROM
- Experimental support for PCI passthrough on Linux hosts
it is important to use the same version as the VirtualBox. The latest version can be found here. to download the extension pack and install it, run the two commands in your terminal.
1 2 3 4 5 6 7 | sudo wget http://download.virtualbox.org/virtualbox/4.3.12/Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack sudo rm -f Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack |
Step 2. Install PhpVirtualBox.
We have to install php-soap module to get PhpVirtualBox to work.
1 | sudo apt-get install php-soap |
And restart the server to get it recognize the new module.
1 | sudo service apache2 restart |
Download the latest version of PhpVirtualBox here.
1 | wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip |
Now we need to extract the file we just downloaded.
1 2 | sudo unzip phpvirtualbox-4.3-1.zip sudo rm -f phpvirtualbox-4.3-1.zip |
If you don’t have unzip do a.
1 | sudo apt-get install unzip |
Move the extracted folder to the apache DocumentRoot.
1 | sudo mv phpvirtualbox-4.3-1 /var/www/html/phpvirtualbox |
Step 3. Configure PhpVirtualBox.
We will have to edit PhpVirtualbox config.php file
1 2 | sudo cp /var/www/html/phpvirtualbox/config.php-example /var/www/html/phpvirtualbox/config.php sudo nano /var/www/html/phpvirtualbox/config.php |
Change the user name and password to that user there is running Virtualbox.
1 2 3 4 | [...] var $username = 'demo'; var $password = 'password'; [...] |
You should now create a file called VirtualBox.
1 | sudo nano /etc/default/virtualbox |
You should add this line in the file.
1 | VBOXWEB_USER=demouser |
Now you should start the vboxweb-service, and make it start automatically on boot
1 | sudo /etc/init.d/vboxweb-service start |
Step 4. Test PhpVirtualBox.
Everything should be installed and working by now. so go to you local_ip_or_domain/phpvirtualbox
it should look like this :
Username : admin
Password . admin
Remember to change your passwordand username
Everything should be running now and it is ready to create your Virtual Machines








