[vbox-dev] Problem with usage of SaveState command
klaus.espenlaub at oracle.com
Wed May 2 11:31:00 PDT 2012
On 27.04.2012 14:32, pdufrene.other at free.fr wrote:
> I am trying to use the COM api and implementing my own front-end
> I create a Virtualbox object.
> I create a Session object.
> I get my machine
> I lock the machine
> I do session.console.PowerUp()
> everything is fine
> Later I call
> progress = session.Console.SaveState();
No idea... the VBox code uses the same API methods as you do (just with
a few convenience wrappers/helpers to be able to use the same source
code with COM and XPCOM), so there are no hints what you're doing wrong.
The code in the CLI tool is at
and the GUI code doing the same is at
> the save state generation starts but fails later with following messages in the LOG
> 00:01:46.033 Changing the VM state from 'RUNNING' to 'SUSPENDING'.
> 00:01:46.065 PDMR3Suspend: 31 003 929 ns run time
> 00:01:46.065 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'.
> 00:01:46.267 Changing the VM state from 'SUSPENDED' to 'SAVING'.
> 00:01:47.484 SSM: Execute save failed with rc=VERR_INVALID_HANDLE for data unit 'HGCM'/#0.
> 00:01:47.497 SSM: Failed to save the VM state to 'C:\xxxxxx\Snapshots\2012-04-27T12-30-58-108530900Z.sav' (file deleted): VERR_INVALID_HANDLE
> 00:01:47.497 Changing the VM state from 'SAVING' to 'SUSPENDED'.
> If I do the same with the Virtualbox Gui, the saved states is well generated:
> 00:00:25.525 Changing the VM state from 'RUNNING' to 'SUSPENDING'.
> 00:00:25.587 PDMR3Suspend: 61 331 660 ns run time
> 00:00:25.587 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'.
> 00:00:42.184 Changing the VM state from 'SUSPENDED' to 'SAVING'.
> 00:00:43.519 SSM: Footer at 0x56f697c (91187580), 33 directory entries.
> 00:00:43.522 SSM: Successfully saved the VM state to 'C:\xxxxxx\Snapshots\2012-04-27T12-34-31-010458900Z.sav'
> 00:00:43.522 Changing the VM state from 'SAVING' to 'SUSPENDED'.
> 00:00:43.522 Console::powerDown(): A request to power off the VM has been issued (mMachineState=Saving, InUninit=0)
> 00:00:43.522 VRDP: TCP server closed.
> 00:00:43.523 Changing the VM state from 'SUSPENDED' to 'POWERING_OFF'.
> HGCM stands for Gost Guest Communication Channel I guess, Do I need to do something before requesting for saved state?
> thanks in advance.
More information about the vbox-dev