Manage VirtualBox with phpVirtualBox (Web Based Interface)

phpVirtualBox is an open source web interface for Oracle VirtualBox, written in php with AJAX implementation. It allows you to remotely manage VirtualBox instance, really useful when you don’t have GUI in operating system. phpVirtualBox allows you control and manage guest instance as like the VirtualBox GUI do, you wont find any difference between the web interface and VirtualBox GUI. More to that phpVirtualBox supports remote console via Oracle RDP web client that comes with Extension Pack.

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).

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 $username = ‘raj’;
var $password = ‘x’;

If you are running VirtualBox and php are on the same host, leave the following $location as it is.

var $location = ‘http://127.0.0.1:18083/’;

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.

phpVirtualBox – Login Page

You can find the created vm’s. You can either create a new vm or work on existing vms by taking console.