Before going to far the main reason for this is to create a VirtualBox server that can be managed remotely and started automatically on reboot. When investigating these issues I noticed a few projects that fit what I wanted.
I will proceed as if VirtualBox has been installed and configured.
— phpVirtualBox —
We will configure phpVirtualBox first. After downloading the zip file from sourceforge you will need to install a LAMP style product to run the software. I decided to use XAMPP as the one stop shop. The install is pretty simple follow the basic instructions, after the install install the applications in the control panel of XAMPP as a service. This will help to configure the server as a headless server. After the install of XAMPP move the unzipped phpVirtualBox to the C:\xampp\htdocs or the location that you specified. Once copied go into the phpVirtualBox folder and change the config example to config.ini. Once renamed you do not need to make any modification unless you want to modify the login or authentication process. If you have changed the vbox username and password for the base install on VirtualBox then you need to change that in the config.ini. Remember to change the default username and password on the first install (admin.admin).
— VBoxVmService —
Next will be the install of the service part of VirtualBox and the starting of the VBox web server that is used with phpVirtualBox. Download and install the VboxVmService, follow the prompts to configure the items if needed. After the install modify the VBoxVmService.ini to match what you would like to run and control with the service. In the ini file make sure to verify the VBOX_USER_HOME location so it matches the installed version on your computer. Change the RunWebService to equal yes (that will allow the phpVirtualBox to run at start). After the basic config has been modifed you will need to add in the virtual machines that you would like to control with the service. Below is a example of the VM’s that i control.
[Vm0]
VmName=PCBSD
ShutdownMethod=savestate
AutoStart=yes
[Vm1]
VmName=Zentyal
ShutdownMethod=savestate
AutoStart=yes
After you have the config file updated run the VmServiceControl and start the VmService from the tray icon in the bottom right corner. Test the install by restarting your computer and connecting to the pc by going to http://your.web.server.ip/phpvirtualbox. Login with admin/admin. Once in you will see the VM’s that you are controlling and the ones that have automatically started with the help of the VboxVmService.
— Screenshots —
VboxVmService Control Panel Menu
phpVirtualBox Main Menu after login
I hope you found this article helpful. If you notice any issues with it please leave a comment. Thanks for reading the first post.