PhpVirtualBox

PHPVirtualbox is a web-based administration utility for Virtualbox

Installation
Currently, app-emulation/phpvirtualbox has no stable version, so you need to add it to your package.accept_keywords file.

Configuration
PHPVirtualbox does not need a virtualbox installation to be present on the same box where PHPVirtualbox is installed. PHPVirtuabox can connect to other machines where your virtual machines are installed. PHPVirtualbox requires a web-server to be present on your box, so we will demonstrate an Apache configuration using SSL certificate to encrypt your communication with the server.

Verify VirtualBox Installation
Virtualbox must be compiled with the vboxwebsrv use flag on the host where your virtual machines are located.

Create SSL Certificate
First, we create our shiny new SSL certificate openssl genrsa -des3 -out virtualbox-server.key 4096 openssl req -new -key virtualbox-server.key -out virtualbox-key.csr openssl x509 -req -days 365 -in virtualbox-server.csr -signkey virtualbox-server.key -out virtualbox-server.crt
 * Create our secret private key
 * Create our new Certificate Singing Request (CSR)
 * Sign the CSR using our private key
 * Place certificate and private key somewhere safe

Configure Apache Virtual Host
Assuming you already have a working Apache installation, you need to create a new virtualhost for your phpvirtualbox installation. This entry should look like this:

The previous configuration is just an example, your installation/configuration may be a lot different.

Configure PHPVirtualbox Installation
The key file for your phpvirtualbox installation is the config.php file deriving from config.php-example file

Edit this file and change the following variables

Verification

 * Start the vboxwebsrv init service on the host where your virtual machines are located (in our case on 192.168.1.205)


 * Restart Apache on the host where your phpvirtualbox was installed

Open your browser and connect to your phpvirtualbox by typing: https://virtualbox.mydomain.example user: admin pass: pass
 * Connect to phpvirtualbox installation
 * You should be able to login using the default credentials