phpVirtualBox – A Web Based Powerful Front End Client For VirtualBox

phpVirtualBox is an open source, web-based client or front end for VirtualBox which written in PHP.

Simple, powerful & modern web interface, it allows you to access and control remote VirtualBox instances.

phpVirtualBox is designed to allow users to Administrate & Manage VirtualBox in a headless environment – mirroring the VirtualBox GUI through its web interface.

When you installed virtualbox on server without GUI, phpVirtualBox is ideal solution to Manage & Administrate VirtualBox in a headless environment.

Make sure you have installed VirtualBox & VirtualBox Extension pack on your environment before proceeding phpVirtualBox installation.

Also Install Apache & PHP for web based access on client system. Navigate to the following article to install VirtualBox on Arch Linux/Manjaro systems.

If you would like to check for alternative tool for phpVirtualBox, i would suggest you to use RemoteBox.

[Install Apache & PHP]
$ sudo apt-get install apache2 php5 php5-mysql libapache2-mod-php5 php-soap

[Start Apache Service on deb based system & openSUSE]
$ sudo systemctl start apache2
$ sudo /etc/init.d/apache2 start

[Start Apache Service on RPM based system]
$ sudo systemctl start httpd
$ sudo /etc/init.d/httpd start

Visit phpVirtualBox official Website and download the latest version phpVirtualBox

$ 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

VirtualBox provides a service called vboxwebsrv which allow phpVirtualBox to connect to it.

[Create Vboxwebsrv user : Use existing user or create new users as your wish]
$ sudo useradd virtual
$ sudo passwd virtual

[Add the user to vboxuser group]
$ sudo usermod -a -G vboxuser virtual

Edit or create the following configuration file using your preferred text editor and Add the following contents.

$ 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 nano /var/www/html/phpvirtualbox/config.php
[...]
var $username = 'virtual';
var $password = '12345';
[...]

Start the virtualbox web service

[Start the virtualbox web service on systemd Systems]
$ sudo systemctl start vboxweb-service

[Start the virtualbox web service on SysVinit Systems]
$ sudo /etc/init.d/vboxweb-service start

Enable the virtualbox web service on boot.

[Start the virtualbox web service on systemd Systems]
$ sudo enable start vboxweb-service

[Start the virtualbox web service on SysVinit Systems]
$ sudo chkconfig vboxweb-service on

Restart Apache Web service.

[Restart Apache Service on deb based system & openSUSE]
$ sudo systemctl restart apache2
$ sudo /etc/init.d/apache2 restart

[Restart Apache Service on RPM based system]
$ sudo systemctl restart httpd
$ sudo /etc/init.d/httpd restart

3) Working with phpVirtualBox

Now you can access phpVirtualBox Web console on any system which have GUI desktop environements through http://ip-address-of-virtualbox-server/phpvirtualbox. The default username/password is admin:admin.
install-phpvirtualbox-web-based-virtualbox-client-1

I have successfully got virtualbox interface, now you can Manage & Administrate the VM’s.
install-phpvirtualbox-web-based-virtualbox-client-2

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...

Shares
Close
Please support the site
By clicking any of these buttons you help our site to get better