The machine IS POWERED OFF, the vboxmanage and the vbox GUI can change the properties without any problem, but the vboxwebsrv can't.
This is the same problem as described here: mail-archive(dot)com/vbox-dev@virtualbox(dot)org/msg05543(dot)html
Here is my php code, which is based on the sample given on the php SDK:
Code: Select all
$connection = new SoapClient("/path/to/vboxwebService.wsdl", array('location' => "public-dns-of-server:18083/"));
$websessionManager = new IWebsessionManager($connection);
$virtualbox = $websessionManager->logon("user","password");
$machines = $virtualbox->machines;
foreach ($machines as $machine){
if ($machine->name == 'vm01'){
$session = $websessionManager->getSessionObject($virtualbox->handle);
$machine->lockMachine($session->handle, 'Shared');
try{
$machine->setMemorySize(2048);
}
catch (Exception $ex){
echo $ex->getMessage();
}
$session->unlockMachine();
$machine->releaseRemote();
$session->releaseRemote();
}
}
$websessionManager->logoff($virtualbox->handle);
Any ideas?
Thanks