Server 2016 Running Hyper-V Stuck in "Shutting down service: Hyper-V Virtual Machine Management"
Solution 1
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
Solution 2
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'.
Solution 3
I have seen many users (myself included) experience this problem if the pagefile is on a different volume from the VM's boot volume with Windows Server 2016 as the OS running on the VM. I'm not sure if that's consistent with your situation, but if it is, that could be the cause for your problem.
For me, the fix (filled with its own problems) was to move the pagefile to the C drive on the VM. Before that, the VM could NEVER completely shut down. After then it shut down properly every time.
I have read that for many people, it was able to shut down properly with the pagefile on a different volume the first 1-3 times, then stopped working after that. That's probably true in my case also, but I don't recall that part with certainty.
Related videos on Youtube
Ryan
Updated on September 18, 2022Comments
-
Ryan over 1 year
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?
-
batistuta09 almost 6 yearsHave you tried shutting down the VMs manually? In any case, you could also try Windows System restore.
-
-
Stan about 5 yearsWindows Server 2016 just took a hair over 2 hours...now if I can only figure out why.
-
Ryan almost 4 yearsThis was pretty much the conclusion I came to as well - a VM getting stuck on and not shutting down gracefully. Unfortunately I didn't have the option of RDPing in the machine and shutting it down so just had to wait, it does eventually time out!
-
whatgives over 3 yearsArno's comment is spot on: On of your VMs isn't shutting down nicely. Just happened to me and I was scratching my head at what was going on. After reading Arnis' comment I looked at my App to see which server is still online even though shouldn't be, RDP ins, shut the VM down and the server then rebooted in like 2 minutes. If you don't have an app showing you which of your VMs is still online it might be a little guesswork involved. It would be nice to know at what point Windows times out and just kills the VM....
-
goodhyun over 3 yearseasily took several hours...
-
Kevin Morse almost 3 yearsSame thing for me. I had a Ubuntu server that was still running. SSH onto it and ran sudo shutdown -h now and the Hyper-V server restarted immediately.