I have a Server 2019 Hyper-V host which has two Windows Server guest VMs. Both VMs are configured to shut down when the host shuts down:
However, any time the Host is restarted or shut down, the guest OSes experience an unexpected shutdown and record event ID 6008 in the System event log ("The previous system shutdown at 2:11:33 PM on 7/26/2019 was unexpected"). When the shutdown process begins on the Hyper-V host, the following events are immediately logged to the Microsoft-Windows-Hyper-V-VMMS/Admin
log:
Event ID: 14100
Logged: 7/26/2019 2:11:46 PM
Source: Hyper-V-VMMS
Text: Shut down physical computer. Stopping/saving all virtual machines...
Event ID: 19060
Logged: 7/26/2019 2:11:46 PM
Source: Hyper-V-VMMS
Text: <VM NAME #1> failed to perform the 'Shutting Down' operation. The virtual machine is currently performing the following operation: 'Shutting Down'. (Virtual machine ID <VM #1 GUID>)
Event ID: 19060
Logged: 7/26/2019 2:11:46 PM
Source: Hyper-V-VMMS
Text: <VM NAME #2> failed to perform the 'Shutting Down' operation. The virtual machine is currently performing the following operation: 'Shutting Down'. (Virtual machine ID <VM #2 GUID>)
What's strange about these events is:
- There's no gap of time between the "stopping/saving VMs" event and the subsequent "VM failed to shut down" events.
- They're logged within seconds of the VM reporting when it was unexpectedly shut down.
Why is this happening and what can I do about it?
Changing the VM shutdown options to Save or Turn off are not an option in this environment. I doubt it matters, but the guest VMs are running Server 2008 R2 and Server 2016.
This is a known issue and a fix is purportedly planned for September 2019
According to this post in the Microsoft Hyper-V server forum, this is a known issue in Windows Server 2019. The thread starter describes the same circumstances that you have, including the event text:
According to the poster "simdoc," Microsoft is aware of this issue:
The poster "Nicolas Rojas," who is identified as an employee of Microsoft indicates the fix will be released in September 2019:
In the meantime I suggest you reconsider using the "Save" option for VMs on shutdown of the Hyper-V Host or manually (e.g. via script) shut down the VMs before planned restarts of the host. Any of these options have to be better than letting the VMs have their power cut without warning.
Aug, 2022 – Windows Server 2019 up do date with last CU, 7 VMs. The problem is still exists. When I shutdown my host property, all VMs are dirty shutdown with unexpected shutdown in the next boot. It's really weird: MS does not know what to do? I've read many techs, but it's useless. The problem is when I have AC fails, VMs could really be crashed.
Same thing happens on Windows Server 2016. We have done extensive investigation and found out the VMMS service is the cause of this issue. If the Hyper-V host is rebooted and there are Windows patches pending, the host will perform a clean shutdown of all VMs and then stop the VMMS service however while the patches are processing, VMMS service re-starts itself in the background which triggers the VMs to start automatically. Once the Windows patches are processed and the host server finally reboots, the VMMS service is not stopped again and the VMs are not cleanly shut down, they are just power cycled (similar to unplugging the power cable while a computer is running). This creates all sort of problems with databases and other software running on those VMs, I even had BSODs on a lot of them which required a full reinstallation.