Server 2016 Running Hyper-V Stuck in "Shutting down service: Hyper-V Virtual Machine Management"
I recently did some updates to a Server 2016 box which acts as a Hyper-V Hypervisor. After performing the updates the server was hanging at "Shutting down service: Hyper-V Virtual Machine Management". It was in this state for quite a while so I gave the server a little nudge by restarting it (I know - I'm an idiot).
When the machine came back up it was hanging at the Windows symbol with the spinner. I restarted again and ran into several issues (such as the OS not booting at all). I removed a disk that was (software) mirroring the boot drive from my RAID array, and now the machine is showing some signs of life. It booted and did some "Working on updates" things, but now it is stuck at "Shutting down service: Hyper-V Virtual Machine Management" again.
What's my best course of action here? Is it just to leave it or to force a restart?
Leave it and it normally eventually shuts down nicely (could be hours).
I have found that I see this issue on new, or quite new server builds. Something happens with some Windows updates that come down while the system is young, then this situation arises. I have seen this on Server 2008, 2012 and now 2016 (would be nice to have a 'fix' Microsoft, or at least a better message 'Shutting down Virtual Machine Management, please do not turn off your computer, this could take an extended amount of time'.
As this is still an issue in 2020 - I might have found a solution for at least some cases (happened to me just yesterday/today at the end of an already loooong workday, when I had no more patience to wait any longer before starting my 2 hour ride home after midnight):
After about an hour of waiting and no reaction whatsoever i tried pinging all the VMs running on the stuck HyperV. Eventually one DID answer the ping (damn them Exchange-Servers...). I tried to shut the VM in question down forcefully with "shutdown /i" (CMD) which just resulted in a "permission denied" message (could have to do with the reason the HyperV had issues putting it to hypernation/pause). I then tried to connect me to the server via RDP which worked like a charm. I manually shut the server down within it's own gui and just a few minutes later the HyperV was successfully rebooted. Only had to restart the trolling VM in HyperV and everything was alife and kickin' again.
May have been a fluke, still have to verify next time (or better shut down the VMs beforhand anyway...), but hey, I would have loved that straw yesterday...
All the best to all admins-pals out there,
Arno