Close Virtual Machine and save state

Discussion about using the VirtualBox API, Tutorials, Samples.

Close Virtual Machine and save state

Postby MaIron » 3. Oct 2017, 18:16

When you manually close the virtual machine window, it asks: "Save the state", "Send the end signal or "Turn off".
If You select "Save the state" Virtual Box close the window and save the state. Then system starts fast.

I use API and when I want "Turn off", I send use command:
Code: Select all   Expand viewCollapse view
console->PowerDown(&progress);

This simple.

But, how I can save the state and close VM window like close window manually?

SaveState certainly does not work.
MaIron
 
Posts: 2
Joined: 3. Oct 2017, 16:27

Re: Close Virtual Machine and save state

Postby noteirak » 4. Oct 2017, 02:20

Please see the Posting Guidelines
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5198
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7

Re: Close Virtual Machine and save state

Postby MaIron » 4. Oct 2017, 06:52

Where does my post violate the rules?
I do not have additional code, I ask for help, what would be suggested here, in which direction to dig.
I need to close console with saving the state, not just turn off the machine.
MaIron
 
Posts: 2
Joined: 3. Oct 2017, 16:27

Re: Close Virtual Machine and save state

Postby socratis » 4. Oct 2017, 11:34

I don't believe that 'noteirak' said anything about rule violation. What he pointed you to were the guidelines, i.e. the minimum amount of information needed to get help. See the bullet list in the guidelines and fill each bullet with your information. You didn't provide the minimum information, and until you do, I believe this is going to be a short conversation...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25308
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5


Return to The VirtualBox API

Who is online

Users browsing this forum: No registered users and 1 guest