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

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
mathieu1911
Posts: 5
Joined: 9. Apr 2013, 18:02

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

Post 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
mathieu1911
Posts: 5
Joined: 9. Apr 2013, 18:02

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

Post 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
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

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

Post by noteirak »

Moved to Virtualbox API category.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply