Automatically create snapshot of shutting down host

This is for discussing general topics about how to use VirtualBox.
Post Reply
CSierks
Posts: 2
Joined: 30. Oct 2018, 11:11

Automatically create snapshot of shutting down host

Post by CSierks »

Hi,

is it possible to configure the virtual box in such a way, that on shutdown of the host a snapshot will be created automatically?

Cheers
CSierks
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Automatically create snapshot of shutting down host

Post by socratis »

Not a built-in one, not exactly what you have in mind. Your best option would be to write a script where you shut down the VM programmatically, take a snapshot, shut down the host.

Alternatively (or even try that first), there is ch. 9.20.9 Default Action when Terminating the VM, where you can set the default action as "SaveState" when shutting down a VM.
  1. I have not tried it, and I'm not planning on shutting down my host to test it... ;)
  2. I'm not sure if the "I'm shutting down" notification will work, or your host will just end the task. You need to try it... That's why I suggested the script first.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
CSierks
Posts: 2
Joined: 30. Oct 2018, 11:11

Re: Automatically create snapshot of shutting down host

Post by CSierks »

Sorry, my mistake. Not on shutting down the host, but the guest.
Sometimes this Snapshot on shutting down the guest can be a direly needed backup. (I lost some data due to unknown interaction between Tortoise SVN, Samba and Linux-File-System, and the automatic snapshot saved me partially).

So on shutting down the guest there is a Default Action.
I will investigate in that.

Thanks for the reply.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Automatically create snapshot of shutting down host

Post by socratis »

CSierks wrote:So on shutting down the guest there is a Default Action.
Be careful with that. It's not shutting down the guest from within the guest, it simply saves the VM state, which means the guest will be resuming live. This is not a snapshot.

Again, if you want to do this, I suggest developing the habit of shutting down the guest properly and taking a snapshot, if you need to. And since too many (more than one) snapshots can mean trouble, I suggest that the next habit you develop involves backing up the whole VM folder and merging the snapshots.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply