phpVirtualBox is a web-based front-end to VirtualBox that enables you to control your VirtualBox environment.An open source, AJAX execution of the VirtualBox user interface written in PHP. As a cutting edge web interface, it enables you to access and control remote VirtualBox cases. phpVirtualBox is intended to enable users to oversee VirtualBox in a headless environment – copy the VirtualBox GUI through its web interface.
Installation
Install Apache and PHP
$ sudo apt-get install apache2 php5 php5-mysql libapache2-mod-php5 php-soap
Start Apache service
# /etc/init.d/httpd start Or # systemctl start apache2
Now download the latest phpVirtualBox for its official website.
$ sudo wget https://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-5.0-5.zip $ sudo unzip phpvirtualbox-5.0-5.zip $ sudo mv phpvirtualbox-5.0-5 /var/www/html/phpvirtualbox $ sudo chmod 777 /var/www/html/phpvirtualbox
Its provides a service called vboxwebsrv which allow phpVirtualBox to connect to it.
Create a user and add to vboxuser group
$ sudo useradd virtual $ sudo passwd virtual $ sudo usermod -a -G vboxuser virtual
Edit or create configuration file and add the above user in it.
$ sudo nano /etc/default/virtualbox VBOXWEB_USER="virtual"
Configure phpVirtualBox by editing config.php file.
$ sudo cp /var/www/html/phpvirtualbox/config.php-example /var/www/html/phpvirtualbox/config.php $ sudo vim /var/www/html/phpvirtualbox/config.php [...] var $username = 'virtual'; var $password = 'virtual@12345'; [...]
Start virtual box web service.
$ sudo systemctl start vboxweb-service Or $ sudo /etc/init.d/vboxweb-service start
Enable on boot.
$ sudo enable start vboxweb-service Or $ sudo chkconfig vboxweb-service on
Restart Apache.
$ sudo systemctl restart apache2 $ sudo /etc/init.d/apache2 restart Or $ sudo systemctl restart httpd $ sudo /etc/init.d/httpd restart
Now open internet browser and access your phpVirtualBox web console which will provide you GUI desktop environment.
http://ip-address-or-domain-name-of-virtualbox-server/phpvirtualbox
Enter your name and password:
Username: admin
Password: admin
You will get virtualbox interface. Now you can Manage and administrate your virtual servers.
Thanks:)
If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.
Leave a Comment