Share via


How safe is Hyper-V auto stop action "save state" when the host reboot?

Question

Friday, November 2, 2018 8:10 AM

Hi, I find that we have two Hyper-V host was set to auto-update Windows Update and reboot. We have a few VMs with legacy OS.  And how well will "Windows Server 2003" and "Windows Server 2008 R2" manage save state if the host reboot?

Hyper-V host OS Server 2012 R2 and Guest OS "Windows Server 2003" and "Windows Server 2008 R2"

/SaiTech

All replies (8)

Friday, November 2, 2018 1:01 PM ✅Answered

Dependence upon the built-in 'save' on reboot is iffy.  An automatic reboot is provided a finite amount of time between the issuance of the request to reboot and when the reboot starts.  This may or may not be enough time for the save of the running VMs to occur.  The OS running in the VM is not a factor at all as Hyper-V is simply writing the memory contents of the VM to a file.  If there is enough time for the write to complete before the automatic shutdown occurs, you have a valid save.  If there is not enough time, you don't have a valid save.

The purpose of the automatic save function is for DR - you set the parameter only on the most critical VM(s).  For planned shutdowns, it is much safer to execute a script before issuing the shutdown command.  The script could perform the save function, and ensure it completes, before the shutdown is issued.

tim


Saturday, February 2, 2019 2:45 PM ✅Answered

Technically, you should open a new post with a new question, particularly since this post is marked as 'answered'.  But we will bypass general forum etiquette this time.

"Does the RAM memory get saved inside the VM, and need enough disk space?"

Yes to both parts of the question.  When a VM is marked as 'save', Hyper-V automatically creates a file on disk of the proper size (size of RAM) in case it is needed.  So it is not creating it at the time of the host shutdown, but at the time the VM starts.

tim


Monday, November 5, 2018 3:19 AM

Hi,

There is some information about "save state" ,please refer to it.

https://www.petri.com/hyper-v-automatic-start-and-stop

There is a catch to the option to save a virtual machine state. If you have virtual machines with a sum of 250 GB RAM, then Hyper-V will need to write out up to (roughly) 250 GB RAM to disk to save their states to disk. You need to size for 250 GB of additional disk capacity beyond the normal storage requirements of virtual machines. You also need to be aware that Hyper-V maintains a .BIN file for each virtual machine to guarantee this space will be available. So that 250 GB is actually consumed even if the virtual machine is running.

Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Best Regards,

Frank

Please remember to mark the replies as an answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Wednesday, November 7, 2018 7:10 AM

Hi,
Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

Best Regards,

Frank

Please remember to mark the replies as an answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Friday, November 9, 2018 9:08 AM

Hi,

Was your issue resolved? 

If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
If no, please reply and tell us the current situation in order to provide further help.

Best Regards,
Frank

Please remember to mark the replies as an answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Friday, February 1, 2019 4:27 PM

Hi, Sorry It took long time to respond. I Think Tim Cerling answer have a good Point, you cant be 100% sure that the VM had  time to do a saved state Before shut down.

I will check if I found it in MS documentation, maybe not....

/SaiTech


Friday, February 1, 2019 4:45 PM

One question more:

The OS running in the VM is not a factor at all as Hyper-V is simply writing the memory contents of the VM to a file?
Ok, I thought the Integration Services was involved, so it is Hyper-V freeze the running VM, and save the RAM to a file?

Does the RAM memory get saved inside the VM, and need enough free disk space?

/SaiTech


Tuesday, February 5, 2019 8:26 PM

Technically, you should open a new post with a new question, particularly since this post is marked as 'answered'.  But we will bypass general forum etiquette this time.

-Thanks Tim I will open a new post next time.

/SaiTech