Page 1 of 1

The machine is not mutable (state is PoweredOff) (0x80BB0002

Posted: 9. Apr 2013, 18:16
by mathieu1911
Hi, I'm trying to use the vbox php sdk, which is connecting to the vboxwebsrv.exe that is listening on the default port 18083. Connection is fine and I can get the list of machines, machines infos, etc. The problem is when I try to change a machine property (like change MemorySize, set VRDE to enabled, etc.) Each time I am trying to change a machine property, vboxwebsrv returns me a SOAP fault: VirtualBox error: The machine is not mutable (state is PoweredOff) (0x80BB0002))

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);
I tried on vbox 4.2.10, 4.2.8, 4.2, 4.0, 3.2, windows server 2012 and windows server 2008 R2. The guy at mail-archive(dot)com/vbox-dev@virtualbox(dot)org/msg05543(dot)html tried on Linux host and it does the same thing..

Any ideas?

Thanks

Re: The machine is not mutable (state is PoweredOff) (0x80BB

Posted: 9. Apr 2013, 20:59
by mathieu1911
Problem solved:

you must take the mutable machine, make changes and then save the settings as mentioned in the SDK manual section 3.2

Re: The machine is not mutable (state is PoweredOff) (0x80BB

Posted: 9. Apr 2013, 23:26
by noteirak
Moved to Virtualbox API category.