Welcome to FreeSoftwareServers Confluence Wiki

sudo su
apt-get update
apt-get install --force-yes -y apache2 php5 php5-mysql libapache2-mod-php5 php-soap dkms unzip wget 

Note: This add's Vbox to Sudoers, you can omit the line usermod -aG sudo vbox if you don't want that.

Replace [PASSWORD]!

wget 'http://sourceforge.net/projects/phpvirtualbox/files/latest/download'
unzip download
mkdir /var/www/html/phpvirtualbox
mv phpvirtualbox*/* /var/www/html/phpvirtualbox
cp /var/www/html/phpvirtualbox/config.php-example /var/www/html/phpvirtualbox/config.php
sh -c 'echo "VBOXWEB_USER=vbox" >> /etc/default/virtualbox'
useradd -m vbox -G vboxusers
usermod -aG sudo vbox
echo "vbox:[PASSWORD]" | chpasswd
nano /var/www/html/phpvirtualbox/config.php 


var $password = '[PASSWORD]';
Setup Start @ boot and start Services :
update-rc.d vboxweb-service defaults
service vboxweb-service start
service apache2 restart 


Note: Even if you use HTTPS, you HAVE to use HTTP to login initially, then it will configure itself to use HTTPS.


Uname : admin
PWD : admin

Troubleshooting CMD's:

sudo nano /var/www/html/phpvirtualbox/config.php 
sudo nano /etc/default/virtualbox
service vboxweb-service restart
service apache2 restart

You can change or even delete the user admin after creating another admin and logging in as that user.

Notes :

PhPVirtualBox does not get "installed" it just goes somewhere that Apache can serve it.

Also this through me off a bit, in my Environment there were already VM's. To register them I had to shut them down and re-register the vmdk files in a new VM created by PhPVirtualBox. I also had VBoxManage list runningvms show some VM's on root and couldn't find the VM's I created. I had to use su vbox to login as vbox then run VBoxManage list runningvms to see the vms it was running.

In essence all VM's created by PhPVirtualBox will run under the user vbox and VboxManage must be run a user vbox to manipulate those VM's.

  • No labels