[vbox-dev] What do I do wrong when savestate and wait for it to finish?

Achim Hasenmueller achim at sun.com
Wed Jun 2 08:35:21 GMT 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.

Achim.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100602/26ab9f6a/attachment.html>


More information about the vbox-dev mailing list