Server 2016 Running Hyper-V Stuck in "Shutting down service: Hyper-V Virtual Machine Management"

28,854

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.

Share:
28,854

Related videos on Youtube

Ryan
Author by

Ryan

Updated on September 18, 2022

Comments

  • Ryan
    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
      batistuta09 almost 6 years
      Have you tried shutting down the VMs manually? In any case, you could also try Windows System restore.
  • Stan
    Stan about 5 years
    Windows Server 2016 just took a hair over 2 hours...now if I can only figure out why.
  • Ryan
    Ryan almost 4 years
    This 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
    whatgives over 3 years
    Arno'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
    goodhyun over 3 years
    easily took several hours...
  • Kevin Morse
    Kevin Morse almost 3 years
    Same 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.