… and the guest server VM won’t reboot
If a Windows Server 2016 guest VM on Hyper-V hangs while stopping after Windows Updates, it might be caused by the recovery debug information type set. Especially when you have moved the Windows PageFile to a different partition/VHDX.
Microsoft Support article KB307973 states:
You can configure the actions that Windows takes when a system error (also referred to as a bug check, system crash, fatal system error, or stop error) occurs. You can configure the following actions:
Write an event to the System log.
To take advantage of the dump file feature, your paging file must be on the boot volume. If you have moved the paging file to another volume, you must move it back to the boot volume before you use this feature.
Meaning, you must have a page file on the boot volume for automatic memory dump to work (this is on by default). So turn this option off if you don’t have a page file on your boot volume (set it to none). This fixed my reboot issues.
The (none) option does not record any information in a memory dump file. To specify that you do not want Windows to record information in a memory dump file by modifying the registry, set the
CrashDumpEnabled DWORD value to 0. For example, type the following information at a command prompt, and then press ENTER:
wmic recoveros set DebugInfoType = 0
This is only an issue if the PageFile is on a different VHDX.
If necessary, kill
TrustedInstaller.exe if the server is hung during reboot working on updates using Sysinternals Suite:
c:\path\to\pskill.exe \\servername TrustedInstaller.exe