PHPVirtualBox is a web interface for VirtualBox made in PHP. Since it’s communication with the VirtualBoxSrv goes in plain text I’m going to set it up on the same host as the VirtualBoxs are running on. The host is just used for virtual machines, so I’m setting up the Apache server to just point to PHPVirtualBox.
I’m using Ubuntu 11.10 and VirtualBox 4.1.2 with extention pack (Oracle VM VirtualBox Extension Pack 4.1.2, rev 73507, use «VBoxManage list extpacks» to see if you got it). I’m just giving you a lot of commands without explaining them.
The last version of PHPVirtualBox was phpvirtualbox-4.1-6.1
# Install Apache and PHP sudo apt-get install apache2 php5 libapache2-mod-php5 cd /var/www/ sudo rm index.html sudo chown `whoami` . sudo /etc/init.d/apache2 restart # Download PHPVirtualBox wget http://phpvirtualbox.googlecode.com/files/phpvirtualbox-4.1-6.1.zip unzip phpvirtualbox-4.1-6.1.zip rm phpvirtualbox-4.1-6.1.zip mv phpvirtualbox-4.1-6.1/* . mv config.php-example config.php nano config.php # Edit username and password for the user running vboxwebsrv in config.php # Start VirtualBox Web Service vboxwebsrv # (or vboxwebsrv -v)
Go to http://localhost/ or http://ip.to.the.server/. Default login is «admin» / «admin». Change password in PHPVirtualBox when your up and running (also see link below)
A problem I had during the this setup was authentication. I did not like putting my password in config.php and got the following line in «vboxwebsrv –verbose» when it was incorrect:
00:00:19.838 SQW03 authenticate(): result of AuthEntry(): 0
This article was inspired by How To Install PhpVirtualBox On Ubuntu 11.04