locked
Guest Fails To Shut Down On Host Power Off RRS feed

  • Question

  • I have a guest VM (Windows Server 2019) set to shut down when the host (Also Server 2019) shuts down, however when the host is turned off the guest fails to shut down.

    The error message is "'(VM Name)' failed to perform the 'Shutting Down' operation. The virtual machine is currently performing the following operation: 'Shutting Down'."

    I am able to successfully power off the guest from the Hyper-V toolbar, which I assume confirms that the shutdown integration service is working correctly.

    Is there anything I can do about this?

    Sunday, July 7, 2019 4:35 PM

Answers

  • This appears to be a bug which has been discussed here: https://social.technet.microsoft.com/Forums/en-US/e8c45a15-0b9a-4b2c-ae2a-c546eadbcf41/hyperv-2019-guest-vmamp39s-shutdown-unexpectedly?forum=winserverhyperv

    It looks like I'll be waiting until at least late September before I can use my new server, unless anyone knows of a workaround?

    Sunday, July 14, 2019 11:11 AM

All replies

  • If the default grace period (120 seconds) is not long enough you can extend it.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization

    DWord named ShutdownTimeout

     

    (please don't forget to mark helpful replies as answer)

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.


    Sunday, July 7, 2019 4:48 PM
  • If the default grace period (120 seconds) is not long enough you can extend it.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization

    DWord named ShutdownTimeout

     

    (please don't forget to mark helpful replies as answer)

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.


    I'm not able to test this at the moment, however the host finishes powering off after around 10-15 seconds, so I doubt this is the problem.
    Monday, July 8, 2019 2:15 AM
  • I'm not able to test this at the moment, however the host finishes powering off after around 10-15 seconds, so I doubt this is the problem.

    Not sure what you mean, are you expecting the guests to have already shutdown in this 10 - 15 seconds?

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Monday, July 8, 2019 2:16 AM
  • I'm not able to test this at the moment, however the host finishes powering off after around 10-15 seconds, so I doubt this is the problem.

    Not sure what you mean, are you expecting the guests to have already shutdown in this 10 - 15 seconds?

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    I assume the shutdown timeout forces the host to continue shutting down if the VM hasn't shut down within this time. I haven't changed the shutdown timeout from default, so I'd assume this can't be the issue as the host powers off well before this period has expired.
    Monday, July 8, 2019 4:20 AM
  • Hi,

    Thanks for your question.

    May I confirm the information below?

    1)Can the guest VM turn off manually on the Hyper-V console? Can it also shutdown normally?

    2)What’s app installed on the guest? Any non-windows programs?

    3)Any error message in the event viewer regarding Hyper-V? we could refer to the following blog,

    https://techcommunity.microsoft.com/t5/Virtualization/Looking-at-the-Hyper-V-Event-Log-January-2018-edition/ba-p/382411

    4)Please also check the VM’s VHD folders and the VM ‘s setting. It may cause the VM stack at the shutdown.

    Hope above information can help you.

    Highly appreciate your effort and time. If you have any question or concern, please feel free to let me know.

    Best regards,

    Michael


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

    Monday, July 8, 2019 6:49 AM
  • The VM can be shut down from the Hyper-V actions menu on the host with no issues.

    The guest is a fresh install of Windows, nothing has been installed and no settings have been modified.

    There is a warning and two error events:

    Warning: "Shut down physical computer. Stopping/saving all virtual machines..."

    Error: "'(VM Name)' failed to perform the 'Shutting Down' operation. The virtual machine is currently performing the following operation: 'Shutting Down'. (Virtual machine ID (VM ID))"

    Error: "'(VM Name)' failed to shut down. (Virtual machine ID (VM ID))"

    • Edited by JImHoward Tuesday, July 9, 2019 6:04 AM missing information
    Tuesday, July 9, 2019 4:58 AM
  • What is the configuration of the VM?  Is it configured to use any of the host specific resources such as a DVD or share?

    tim

    Tuesday, July 9, 2019 12:36 PM
  • The only settings I have changed from default were the storage location, shutdown action and cores/ram.
    Tuesday, July 9, 2019 1:14 PM
  • Hi,

    Thanks for your update.

    Did you configure to enable Dynamic Memory for this VM? Please also check if there's enough resources (CPU, RAM, and space capacity) setting for it?

    The Shutdown Action you configured for the VM is that "Automatic Stop Action" as the following figure, and which option did you select on this tab?

     

    Furthermore, may I confirm that any other VMs in this host encountered this issue?

    Highly appreciate your effort and time. If you have any question or concern, please feel free to let me know.

    Best regards,

    Michael


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

    Wednesday, July 10, 2019 8:24 AM
  • The host has many times more resources than the (single) guest would ever need, so I don't think that's an issue. I have performed a hardware test and have found no faults so I doubt that's an issue either.

    I have reinstalled the host and guest using all defaults and the problem still persists, even after installing the latest updates.

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

    Thursday, July 11, 2019 3:36 AM
  • Hi,

    Thanks for your detailed update.

    The similar link applies to windows server 2012R2 and previous version, and there isn't update for 2019. 

    May I confirm that all important components are checked in the Integration service Tab.

    And which option did you select on the "Automatic stop action" tab of the VM setting?

    Furthermore, here's a similar thread as your situation for your reference, hope it helps. 

    https://social.technet.microsoft.com/Forums/windowsserver/en-US/5ac728cd-8c22-44e0-8675-071ca1f0c46c/hyperv-guest-os-does-not-shutdown-when-shutting-down-the-host-only-when-rebooting?forum=winserverhyperv

    If you have any question or concern,please feel free to let me know.

    Best regards,

    Michael


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

    Thursday, July 11, 2019 7:37 AM
  • Hi,

    How are things going on? Was your issue resolved?

    Please feel free to let me know if you need further assistance.

    Best regards,

    Michael


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


    Saturday, July 13, 2019 11:08 AM
  • This appears to be a bug which has been discussed here: https://social.technet.microsoft.com/Forums/en-US/e8c45a15-0b9a-4b2c-ae2a-c546eadbcf41/hyperv-2019-guest-vmamp39s-shutdown-unexpectedly?forum=winserverhyperv

    It looks like I'll be waiting until at least late September before I can use my new server, unless anyone knows of a workaround?

    Sunday, July 14, 2019 11:11 AM
  • OK, I'll stand by with you. If any update or concern, please feel free to let me know.

    Thanks for your patience and understanding.

    Best regards,

    Michael


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

    Wednesday, July 17, 2019 10:57 AM