Here is the small guide to setup phpVirtualBox on Ubuntu (Its supports all Linux Variants, its minimum requirement is to have the web server installed with PHP support).
Prerequisites:
Install Apache with PHP.sudo apt-get install apache2 php5 libapache2-mod-php5
Download phpVirtualBox:
Issue the following command to download the lastest phpVirtualBox.wget 'http://sourceforge.net/projects/phpvirtualbox/files/latest/download'
Extract it.sudo unzip phpvirtualbox-*.zip
Move it to default document root of web server.sudo mv phpvirtualbox-* /var/www/html/virtualbox
Configure phpVirtualBox:
We need to modify the phpVirtualBox configuration to make the successful communication with VirtualBox installation, first we need to rename sample config file (config.php-example to config.php).sudo mv /var/www/html/virtualbox/config.php-example /var/www/html/virtualbox/config.php
Modify the config filesudo nano /var/www/html/virtualbox/config.php
Following are the minimum configuration for phpVirtualBox. User Name /
Password for the system that runs VirtualBox, in my case i am using
user “raj”, because he will be configured to run vboxwebsrv service(
will be set in next step).var $password = ‘x’;
Configure vboxweb-service:
VirtualBox setup creates init script vboxweb-service when it is installed, this is used to start and stop the vboxwebserv, before starting the service, we need to have /etc/default/virtualbox file because it contains settings for the service . We need to create it manually if it does not exists.sodo nano /etc/default/virtualbox
We must set minimum VBOXWEB_USER to run the vboxweb-service, now
VirtualBox will run as “raj”; this user and password must be entered in
phpVirtualBox config file.VBOXWEB_USER=raj
If you are running phpVirtualBox in some other host, VBOXWEB_HOST is
need to be set in the same file, in this case phpVirtualBox will
communicate with vboxweb-service over the network.VBOXWEB_USER=raj
VBOXWEB_HOST=192.168.1.103
Restart the vboxweb-service.sudo /etc/init.d/vboxweb-service restart
Now open a web browser and point to http://your-ip-address/virtualbox, you will be asked to login. Default login is admin /admin.You can find the created vm’s. You can either create a new vm or work on existing vms by taking console.
To take a remote console you must install VirtualBox Extension Pack and also you have to Enable Remote Console.
You can take console by clicking console tab in browser.
OR
Take mstsc of host server where VirtualBox is running.
That’s All. We welcome your comments, please do comment in comments section.
ที่มา : https://www.itzgeek.com/how-tos/virtualization/manage-virtualbox-with-phpvirtualbox-web-based-interface.html