<div dir="ltr">Hi everyone,<div>I'm trying to change some VM setting during the execution of virtualbox. I read in SDK documentation that it's possible only locking the machine and saving its state, otherwise no change will be performed.</div>

<div><br></div><div>I tried to achieve it using java api (com-xpcom glue) and custumize TestVBox.java, but I fall into these errors:</div><div><ul><li>if I write <br><font face="courier new, monospace">m.lockMachine(sess, LockType.fromValue(2)); // lock write</font><br>

<font color="#ff0000">The function "lockMachine" returned an error condition: "The machine 'NAME' is already locked for a session (or being unlocked)" (0x80bb0007)<br></font><br></li><li>if I write<br>

<font face="courier new, monospace">sess.unlockMachine(); </font><br><font color="#ff0000">The function "unlockMachine" returned an error condition: "The session is not locked (session state: Unlocked)" (0x8000ffff)</font><br>

<br></li><li>if I write directly (without any lock command)<br><font face="courier new, monospace">m.saveSettings(); </font><br><font color="#ff0000">The function "saveSettings" returned an error condition: "The machine is not mutable (state is Running)" (0x80bb0002)</font><br>

</li></ul><div><br></div><div>How could I solve it?</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div>-- <br><div dir="ltr">Federica Renzi</div>
</div></div>