Page 1 of 1

starting a vm from a php webpage

Posted: 28. Nov 2012, 06:31
by jstillwell
I am trying to start a vm from a link on a php page on my server.
I am using jquery to start an AJAX call that triggers a php script to run exec(vboxmanage.exe startvm "vm name");

For some reason it doesnt work. I have tried using popen and other php functions to open it as well but it never starts. I get no errors in my php logs either.

I can run the cmd in the console and its fine. I have tried starting it as a batch file and as a shortcut set to run as admin.

Has anyone tried this before? got any tips or tricks?

Re: starting a vm from a php webpage

Posted: 28. Nov 2012, 17:10
by noteirak
try exec("vboxmanage startvm \"vmname\" --type headless");
This will work if your host is Linux, else you will need to put the full path to vboxmanage for a windows host