[vbox-dev] What do I do wrong when savestate and wait for it to finish?
achim at sun.com
Wed Jun 2 01:35:21 PDT 2010
On Jun 1, 2010, at 22:34 , DavidW wrote:
> I do the following steps:
> 1, call IConsole_saveState
> 2,call IProgress_waitForCompletion
> 3,call IProgress_getPercent, result is 100
> 4, connect to session again, call IMachine_getState
> I expect the result should be “Saved”, but I still get “Running”. But the VM is saved, that means it does the savestate, but returns without waiting for them to complete.
> Any idea?
Do you close the session after IConsole_saveState using Iession_close? Closing sessions is very important. The code sequence you mentioned should work. Also, in order to check the machine state, you do not need a session, you can query the IMachine object returned from IVirtualBox.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vbox-dev