Forum Discussion
Reinhard Schuerer
Jun 03, 2022Copper Contributor
Windows Server 2022 Hyper-V guest state not saved on host reboot
Windows Server 2022 with latest updates. All VMs are set to "Automatic Stop Action" = Save But on every reboot the VMs lose their state and the Windows VM reports "The system has rebooted without c...
Mikael
Jan 16, 2023Brass Contributor
Maybe related. https://learn.microsoft.com/en-us/answers/questions/1161178/dirty-shutdown-of-guest-on-squeaky-clean-2022-stan
A question I posted moment ago.
This install drives me up the walls, I can't figure out why guest are killed of in the way they are.
I worked around it with a temporary solution with GPO startup/shutdown scripts. The scripts replicate the behavior of the built in function which should manage this. The code is messy but it does the job.
I've attached them. Check the paths in use or use your own and modify the script.
C:\prg\script (put the scripts here and link them to powershell startup/shutdown with gpedit.msc)
C:\prg\script\vm-log (log and state file goes here, they are created from the script)
Brgs,