none
Hyper-V 2019 - Guest VM's shutdown unexpectedly

    Question

  • Hi,

    Since upgrading my Hyper-V servers to Windows Server 2019, including KB4471332 from last night, my guest VM's do not power down on restart of the 2019 host.

    I can confirm integration components are as up to date as possible, and each guest is configured to shutdown when the host restarts.

    Each guest gets the "Why did I shutdown unexpectedly message".

    The even viewer yields the following all within 30 seconds of restarting the host:

    Shut down physical computer. Stopping/saving all virtual machines...

    'ADFS' failed to perform the 'Shutting Down' operation. The virtual machine is currently performing the following operation: 'Shutting Down'. (Virtual machine ID 0CFDF648-EE9D-4141-9EBD-9A6D911C3442)
    'ADFS' failed to shut down. (Virtual machine ID 0CFDF648-EE9D-4141-9EBD-9A6D911C3442)

    The Update Orchestrator Service service terminated with the following error:
    This operation returned because the timeout period expired.

    Failed to restore configuration for port 59229EE2-C880-4BF2-9849-89A21EC17772 (Friendly Name: ) on switch 300C0E17-E123-4182-BE62-AAD1860BE841 (Friendly Name: ), status = Object Name not found..

    Everything is configured as it was on the 2016 Hyper-V host.

    The message ADFS failed to shut down because it is shutting down seems terribly odd to me.  Of course its shutting down, just need the host to wait. (Yes the registry is set to 120 as the default time for the host....)

    Fairly simple to recreate....just spin up a 2019 server, install Hyper-V role, throw in a VM and test.

    Any help would be appreciated, but my money is on it being another bug.

    Wednesday, December 12, 2018 8:26 AM

All replies

  • Hi,

    Thanks for posting in our forum!

    I am a bit confused about your description, as i understand, you upgrade your hyper-v server from 2016 to 2019, and when you restart the 2019 host, the vm also restart automatically. if i misunderstand, please let me know.

    In addition, could you please provide a screenshot of your vm settings? just like below:

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, December 13, 2018 8:19 AM
    Moderator
  • Daniel,

    You misunderstand.

    Quite simply, when I reboot the 2019 host, the VM's are set to shutdown, not restart.

    The host is NOT waiting for the guest VMs to shutdown, resorting in the guests all saying "Why did I unexpectedly shutdown" e.g. the power was pulled....

    The host restarts as expected, but it is NOT waiting for the VM's to shutdown cleanly before doing so.

    Thursday, December 13, 2018 9:10 AM
  • Hi,

    Thanks for your reply!

    May i know which option do you check in automatic stop action in hyper-v settings:

    In addition, you can refer to the following link,maybe can help you:

    https://support.microsoft.com/en-gb/help/2028504/windows-kernel-event-id-41-error-the-system-has-rebooted-without-clean

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Friday, December 14, 2018 8:19 AM
    Moderator
  • I absolutely agree with ProximusAl that there is a bug in Windows Server 2019.

    I believe ProximusAl selected the "Shut down the guest operating system" option and the guest VMs fail to gracefully shutdown

    We need to receive update from Windows to fix this bug. I wish to highlight that Windows Server 2012 R2 and Windows 8.1 previously had this problem until Microsoft released an update to fix the bug.

    https://support.microsoft.com/en-my/help/2896800/hyper-v-guest-os-does-not-shut-down-when-you-restart-the-host-computer

    Friday, December 14, 2018 1:49 PM
  • I am also seeing this behavior on our test system with Server 2019. I even made a powershell shutdown script to run guest shutdown on the VMs, and it works perfectly if I run it manually, but if I ask the server to restart/shutdown the VMs all get stopped improperly. They are all configured for "shut down the guest operating system" in Hyper-V manager.

    Friday, December 14, 2018 3:19 PM
  • Hi,

    This is Daniel and wish you all the best!

    May I know whether your problem is solved? If you have any question, please let me know.

    Thanks for your time and have a nice day!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, December 17, 2018 2:13 AM
    Moderator
  • Hi Daniel, 

    Unfortunately, this problem is not fixed. We will need an update from windows to rectify this bug in Windows Server 2019. 

    This error was previously reported for Windows Server 2012 R2 and Windows 8.1 

    https://support.microsoft.com/en-my/help/2896800/hyper-v-guest-os-does-not-shut-down-when-you-restart-the-host-computer

    Here's the except from the article: 

    Hyper-V guest OS does not shut down when you restart the host computer that is running Windows Server 2012 R2 or Windows 8.1

    Applies to: Windows 8.1Windows 8.1 ProWindows 8.1 Enterprise More

    Symptoms

    Consider the following scenario:

    You set up a Hyper-V virtual machine on a host computer that is running Windows Server 2012 R2 or Windows 8.1.
    You set the Automatic Stop Action setting of the virtual machine to Shut down the guest operating system.
    You restart the host computer.

    In this scenario, the guest operating system (OS) on the virtual machine does not shut down. Additionally, after you restart the virtual machine, the following event is logged on the guest OS: Note If the computer is part of a cluster, this issue does not occur.


    Cause
    This issue occurs because the Virtual Machine Management Service tries to shut down the virtual machine by using the Virtual Machine Worker process. However, the process encounters a logic failure that causes the shutdown operation to fail and reverts the shutdown operation. Therefore, power cycling occurs instead of a clean shutdown.


    Resolution
    Update information
    To resolve this issue, install update rollup 2887595. For more information about how to obtain this update rollup package, click the following article number to go to the article in the Microsoft Knowledge Base:
    2887595 Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2 update rollup: November 2013


    Monday, December 17, 2018 3:21 AM
  • Hi Daniel, 

    Thank you for looking into this issue and I hope it can be fixed. 

    Best regards,

    Jeff

    Monday, December 17, 2018 7:45 AM
  • Hi jeff,

    I will post in our forum if i have any progress.

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, December 17, 2018 8:11 AM
    Moderator
  • Hi,

    Hope you are doing well!

    I haven't received your reply for a while, how is the problem now, if your problem is solved, would you please share your experience with us? if there is anything need to help, please let me know. In addition, if anyone’s reply is helpful to your problem, please mark it as an answer at your convenience so that other people who have similar problem can refer to. I appreciate your cooperation!

    Thanks for your time and have a nice day!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 19, 2018 2:43 AM
    Moderator
  • I am also seeing this behavior on our test system with Server 2019. I even made a powershell shutdown script to run guest shutdown on the VMs, and it works perfectly if I run it manually, but if I ask the server to restart/shutdown the VMs all get stopped improperly. They are all configured for "shut down the guest operating system" in Hyper-V manager.

    I got the exactly same issue through on the testing server.  The VMs just export from a Server 2016 Hyper-v.

    on Server 2019, the host system reboot, the VMs are just "lost power". It looks like 2019 host os never wait the VMs shutdown gracefully, or just skip the shutdown VM procedure.

    after comb the events, no error found. So I assume this is a bug of Server 2019

    Wednesday, December 19, 2018 11:39 AM
  • I got the same issue, no fix found. 

    So we have to write powershell script to work around it like the others.

    Still waiting MS to fix the bug. Our Server Updating plans have to be postponed 

    Wednesday, December 19, 2018 11:44 AM
  • I'd like to add to this. Although I made a powershell script to shutdown the guest VMs and this does work when I run it manually, if I add it to "shutdown scripts" via group policy, it looks like it kills the VMs before running the script, so this doesn't even function as a work around.

    Microsoft needs to take a look at this and fix whatever is causing it as it is now confirmed by several different people with Server 2019 (per this thread).

    Wednesday, December 19, 2018 9:38 PM
  • Hi bud. 

    group policy script runs after most service had already stopped.

    If you put your script to "shutdown scripts" in group policy, when the system get to your script, those Hyper-v services are already stopped, that means the VMs are already been killed before the script running.

    My way is to create a schedule task to run the script.

    Hope this might help you.

    Thursday, December 20, 2018 7:26 AM
  • Thanks Colin. I was just trying to clarify that a group policy shutdown script didn't seem to be a valid work-around in case my previous comment was read that way.

    Thursday, December 20, 2018 3:44 PM
  • Hi ProximusAl,

    How is the problem now? if you have any other concerns, please let me know.

    Merry Christmas!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Friday, December 21, 2018 9:33 AM
    Moderator
  • Hi ProximusAl,

    How is the problem now? if you have any other concerns, please let me know.

    Merry Christmas!<o:p></o:p>

    Best Regards,<o:p></o:p>

    Daniel<o:p></o:p>


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Errr, the problem still exists as it’s a BUG. Nothing I can do will fix it, these needs action from Microsoft. You can clearly see from this thread that many people have the problem. Merry Christmas
    Friday, December 21, 2018 2:10 PM
  • Hi,

    Thanks for your reply!

    I need to reproduce your environment and test it, would you please help me clarify the following information?

    1. What's the version number of your Host?

    2. What are your virtual machine settings?


    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Monday, December 24, 2018 7:06 AM
    Moderator
  • Forgive me for losing my cool, but the information you are asking for are literally the first two sentences of the OP and has been reiterated several times by many of us.

    If it helps, I'll unnecessarily post my settings in a screenshot (which are the same as his, per his comments).

    Guest shutdown works correctly via powershell, but not if initiated by a Hyper-V host shutdown.

    It affects all of my guests on this host, regardless of guest OS version.

    Merry Christmas everyone.



    • Edited by Filibuster Monday, December 24, 2018 3:28 PM
    Monday, December 24, 2018 3:27 PM
  • Forgive me for losing my cool, but the information you are asking for are literally the first two sentences of the OP and has been reiterated several times by many of us.

    If it helps, I'll unnecessarily post my settings in a screenshot (which are the same as his, per his comments).

    Guest shutdown works correctly via powershell, but not if initiated by a Hyper-V host shutdown.

    It affects all of my guests on this host, regardless of guest OS version.

    Merry Christmas everyone.




    Cheers Fill I hate these forums so much sometimes with a passion as you explain everything quite clearly in the first post and get utter **** in return. It’s quite simple. 1. Install the Hyper-V role on server 2019 2. Install a VM of your choice 3. Set the VM settings to shutdown when the host shutsdown 4. Shutdown the host and observe the consequences on the VM It can’t be anymore simple. My stomach turns everytime I read a new post on this forum, especially from Microsoft. Just fix the ruddy bug FFS.
    Monday, December 24, 2018 9:26 PM
  • Forgive me for losing my cool, but the information you are asking for are literally the first two sentences of the OP and has been reiterated several times by many of us.

    If it helps, I'll unnecessarily post my settings in a screenshot (which are the same as his, per his comments).

    Guest shutdown works correctly via powershell, but not if initiated by a Hyper-V host shutdown.

    It affects all of my guests on this host, regardless of guest OS version.

    Merry Christmas everyone.



    Exactly same condition I encountered.

    By the way, my Host system upgraded to 17763.195, and the problem is still there

    Merry Christmas everyone.

    Tuesday, December 25, 2018 9:37 AM
  • So many guys repeat this problem so clearly.

    Just make a bug report to the coding team or some other Dpt, Please.

    Sometime discussing errors in this forum feels like talking to the wall.

    Please make the bug report already! please please!

    Merry Christmas

    Tuesday, December 25, 2018 9:46 AM
  • Hi,

    I am testing now, please wait for my update!

    Merry Christmas!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, December 25, 2018 9:49 AM
    Moderator
  • Hi,

    I am testing now, please wait for my update!

    Merry Christmas!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    So what's the story Danie1zhou?

    Have you managed to recreate this issue and reported it as a bug?

    Wednesday, January 2, 2019 1:21 PM
  • Hi,

    Thanks for your reply!

    The results of my tests are the same as yours.I have reported the result. Please wait patiently. I will let you know as soon as the result is available.

    Thanks for your understanding!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, January 3, 2019 3:03 AM
    Moderator
  • Has passes 1 year...

    Is the problem solved?

    I still run into it!

    Wednesday, January 9, 2019 2:46 PM
  • Just wanted to add to this that we have started to see this behavior (2 maybe 3 months now) with our 2016 Hyper-V hosts as well...

    So PLEASE include the 2016 OS in any bug-fix/resolution

    Wednesday, January 16, 2019 2:30 PM
  • Hi,

    Thanks for your reply!

    The results of my tests are the same as yours.I have reported the result. Please wait patiently. I will let you know as soon as the result is available.

    Thanks for your understanding!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Jan 10 updates had been already rolled out and installed, The problem still there.

    Is this topic going cold? We still look forward to update our servers to 2019

    Friday, January 25, 2019 5:16 AM
  • Hi,

    Thanks for your reply!

    The results of my tests are the same as yours.I have reported the result. Please wait patiently. I will let you know as soon as the result is available.

    Thanks for your understanding!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Jan 10 updates had been already rolled out and installed, The problem still there.

    Is this topic going cold? We still look forward to update our servers to 2019

    I would have been surprised if this was addressed in January but it would be nice to get a confirmation that this has been acknowledged by the developers and a fix is in the works for February.

    Friday, January 25, 2019 10:23 PM
  • Wow. How can a bug like this be introduced into a "Production" level build of Windows Server not once, but TWICE? This is the exact same issue that occurred when 2016 was released. It took the Microsoft rep close to a month to acknowledge that this was even a problem, now we are just waiting for a fix with no official report from Microsoft.

    I finished upgrading my test host cluster to 2019 a few days ago. Power cycle the all of the hosts and am greeted with the lovely "why did the computer shut down" message on all VMs.

    Microsoft clearly does not care about QA anymore. Issues like this make me want to switch to VMware.

    As a couple posters above mentioned, it makes me want to throw something every time I see a Microsoft rep use the most useless canned response on a thread like this. All of the info is in the OP, there is no reason why this could not have been addressed quicker. I honestly trust random community members more than official Microsoft reps due to all the crap I see posted by them.

    Saturday, January 26, 2019 1:54 AM
  • Hi,

    Thanks for your reply!

    The results of my tests are the same as yours.I have reported the result. Please wait patiently. I will let you know as soon as the result is available.

    Thanks for your understanding!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact 

    I have the same problem. Now it's February and the BUG is still there, this is a shame.
    Sunday, February 3, 2019 10:09 PM
  • Could anybody of the affected crowd test if setting the automatic stop action to "Save the virtual machine state" (=suspend the VM) makes a difference? Because that is the default and what we use and never had any problem on no version of hyper-v.

    By the way, I would encourage people to use suspend, we never had any problems with it and we host all sorts of VMs (SQL Servers, DCs, File servers, clients,...).

    Tuesday, February 5, 2019 4:56 PM
  • It does seem that Save works still yes. However, this is not a solution. It's good to know that Save works on DCs, I've always avoided it on them. One of the problems with Save is that it reserves space for the amount of RAM a VM is using. On systems with large amounts of RAM, this could be terabytes of space used just to enable Save.

    I'm hoping that there is a fix released this patch Tuesday.



    Friday, February 8, 2019 9:28 PM
  • Hi,

    Thanks for your reply!

    The results of my tests are the same as yours.I have reported the result. Please wait patiently. I will let you know as soon as the result is available.

    Thanks for your understanding!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    I just updated to the February 2019 update and this issue is still not fixed.

    Kolby is right - "Save" is not an option for everyone.

    I think this thread has been abandoned - the closest thing to a Microsoft employee we've seen hasn't replied to anything lately. We've had no confirmation that this has been recognized by developers.

    I'll see if I can find a better way to report this.

    Thursday, February 14, 2019 5:21 PM
  • Hi,

    Thanks for your reply!

    The results of my tests are the same as yours.I have reported the result. Please wait patiently. I will let you know as soon as the result is available.

    Thanks for your understanding!

    Best Regards,

    Daniel


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    I just updated to the February 2019 update and this issue is still not fixed.

    Kolby is right - "Save" is not an option for everyone.

    I think this thread has been abandoned - the closest thing to a Microsoft employee we've seen hasn't replied to anything lately. We've had no confirmation that this has been recognized by developers.

    I'll see if I can find a better way to report this.

    I hope there's another way to get Microsoft to fix this bug. It's still remains unresolved at my end. =(
    Saturday, February 16, 2019 1:37 AM
  • Same issue here. Server 2019, build 10.0.17763.316. This is a huge bummer.
    Saturday, February 16, 2019 3:51 PM
  • I wanted to chime in we've seen the same behavior.  Fresh Windows 2019 installs with the latest Windows Updates on new Dell servers.  VMs were exported from Windows 2012 Hyper-V server and imported into Windows 2019 Hyper-V server and had their Config Version upgraded to 9.0.  All replicate to an identical equipped and configured server.

    I've had a lot of issues with Windows Server 2019 as a Hyper-V host system being unstable.

    • This issue
    • Some VMs don't start even though automatic start is set if a delay is assigned
    • The main VMM service becomes unresponsive to communications from itself, PowerShell, and Hyper-V Manager remotely requiring a hard power off since the system won't shutdown
    • If a teamed NIC is using LACP and Hyper-V starts before LACP completes negotiation Hyper-V will fail to start some VMs because of a lack of network resources

    Systems Administrator Senior - University of Central Florida

    Wednesday, February 20, 2019 4:09 PM
  • Anyone want to put a bet on this getting sorted with cumulative update tonight?
    Tuesday, March 12, 2019 3:03 PM
  • Did any get this to work after the CU? I'm withholding my updates until this gets resolved. 
    Thursday, March 14, 2019 4:18 AM