none
Hyper-V - 'Operating system shutdown' not functioning on Windows Server 2012 R2

    Question

  • I have a newly installed Windows Server 2012 R2 running the Hyper-v role, the only role it is using.

    I have created a new Generation 2 guest VM, Windows Server 2012 R2 std, the only VM and set 'Automatic Stop Action' to 'Shutdown the guest operating system'

    Host:

    Dell 2950 Dual processor, 8 core, 32Gb RAM

    Info:

    The 'Hyper-v Guest Shutdown Service' is running in the VM.

    VM will shutdown using hyper-v manager.

    Problem:

    Shutdown the host from the shutdown dialogue and the VM is turned off and not shutdown!

    Any ideas please?






    • Edited by ABitEncrypted Monday, September 23, 2013 3:25 PM Clarification
    Monday, September 16, 2013 3:54 PM

Answers

  • Hi All,

    First - let me apologize about the fact that this bug was not caught during development.  I can confirm that this is a known issue, and we have been able to reproduce it.  We are currently looking into what we can do to get this addressed - but I cannot make any commitments at this point in time.

    If you are wondering how this issue was not detected - the primary reason is because this does not happen in a clustered configuration (if you have virtual machines configured to shutdown on host shutdown, and the host is clustered, then everything works correctly).  Though I understand that this is not a valid excuse, and we are definitely making sure we have the correct test coverage here so that this does not happen again in the future.


    Cheers,<br/> Benjamin Armstrong<br/> ============================<br/> Hyper-V<br/> Principal Program Manager Lead<br/> <br/> This posting is provided AS IS with no warranties, and confers no rights. You assume all risk for your use.

    • Marked as answer by ABitEncrypted Tuesday, October 29, 2013 6:27 PM
    Tuesday, October 29, 2013 5:59 PM
    Owner

All replies

  • Hi,

    Have you ever change the Automatic Stop Action as “Shutdown down the guest operating system”? If you want to automatic save the child vm, you must choose the “Save the virtual machine state”.

    The related article:

    Setting up Hyper-V with a UPS

    http://blogs.msdn.com/b/virtual_pc_guy/archive/2009/10/22/setting-up-hyper-v-with-a-ups.aspx

    Hope this helps.


    Alex Lv

    Friday, September 20, 2013 12:21 PM
    Moderator

  • Hi,

    I would like to check if you need further assistance.

    Thanks.


    Alex Lv

    Monday, September 23, 2013 3:17 AM
    Moderator
  • Hi Alex,

    Sorry I was not very clear in my original post.  Please re-read it and you will see that in fact the 'Automatic Stop Action' is 'Shut down the guest operating system' Therefore, in response to your question - Yes I need further assistance because I think I have found an issue with shutting down the guest automatically when the host is shutdown in Server 2012 R2.

    Howard

    Monday, September 23, 2013 3:29 PM
  • Hi,

    Please confirm the guest vm integration service have install correctly and the in the guest vm confirm the “Hyper-V Guest Shutdown service” is running.

    Thanks.


    Alex Lv

    Tuesday, September 24, 2013 8:54 AM
    Moderator
  • Hi,

    I would like to check if you need further assistance.

    Thanks.


    Alex Lv

    Monday, September 30, 2013 3:15 AM
    Moderator
  • Hi,

    I would like to check if you need further assistance.

    Thanks.


    Alex Lv

    Hi Alex,

    Thank you for devoting time to this.  However, in answer to you question - yes.

    Although I can live with setting the guest VM to save state when the host is shutdown I would like to know why the 'Shut down the guest operating system' does not function.  As I set out in my original post and reiterate here -

    1. The VM is a generation 2 VM.
    2. The VM guest has the latest version of integration services installed.
    3. The 'Hyper-V Guest Shutdown Service' is running in the VM guest.
    4. The 'Automatic Stop Action' is set to 'Shut down the guest operating system'
    5. The host is shutdown from its shutdown menu, not via a UPS.
    6. The host is a new Windows Server 2012 R2 installation.
    7. The guest VM is a newly installed Windows 2012 R2 server.
    8. When the host is shut down the guest VM is abruptly turned off and not shutdown leading to a notification when the VM is restarted.

    My gut feel is that this is an issue in the new Windows Server 2012 R2 release.


    Monday, September 30, 2013 8:05 AM
  • Hi Howard,

    I can confirm the problem. I've running two different Hyper-V Servers with Windows Server 2012 R2 RTM (MSDN) and the guest operating systems are not gracefully shutdown any more. The VM are abrupt stopped in the way, like the "Turn off" option has been selected. The Hyper-V eventlog confirms, that the VM are turned off, although the "Shut down guest operating system" Option was chosen.

    I've noticed this newly situation after a Windows Server 2012 to 2012 R2 in-place upgrade. In advance of the upgrade, Hyper-V shuts down the VM properly.

    Any ideas what's going wrong ?

    As workaround also the shutdown via a group policy shutdown script does not work, whilst the Virtual Machine Service was stopped at the Hyper-V host prior to the execution of the shutdown script.

    Saturday, October 05, 2013 10:36 PM
  • I just experienced the same on the new Windows 2012 R2 Build, when VM is setup to Automatic Stop Action to Shut Down the guest operating system it Turn the VM and surprisingly it doesn't power up the system back up after restarting the host :(

    MS please get that fixed!!

    Monday, October 07, 2013 10:02 PM
  • I have exactly the same problem with 4 Different nodes.

    Save nor shutdown is working as Automatic Stop Action.

    Tuesday, October 08, 2013 3:41 PM
  • I just experienced the same on the new Windows 2012 R2 Build, when VM is setup to Automatic Stop Action to Shut Down the guest operating system it Turn the VM and surprisingly it doesn't power up the system back up after restarting the host :(

    MS please get that fixed!!


    I just have the evaluation version of Server 2012R2 and i don't found the problem, please check your system image, please confirm you the "Auto Start action" setting.

    Alex Lv




    Wednesday, October 09, 2013 11:25 AM
    Moderator
  • With evaluation you mean this Preview? http://technet.microsoft.com/en-us/evalcenter/dn205286(v=msdn.10).aspx

    It's not the same version as the on MSDN available build.

    My systems are all Build 9600, whats your evaluations buildnumber?

    Wednesday, October 09, 2013 12:30 PM
  • I just experienced the same on the new Windows 2012 R2 Build, when VM is setup to Automatic Stop Action to Shut Down the guest operating system it Turn the VM and surprisingly it doesn't power up the system back up after restarting the host :(

    MS please get that fixed!!


    I just have the evaluation version of Server 2012R2 and i don't found the problem, please check your system image, please confirm you the "Auto Start action" setting.


    Alex Lv

    Hi Alex,

    I think you need to install the RTM version of Windows 2012 R2 and try again.  I cannot say whether the preview suffers with the same issue as I never installed it.  I have now installed Windows Server 2012 R2 on two bare metal servers as dedicated Hyper-V Hosts.  Both installations exhibit the same issue and yes all of your suggestions were checked.  This must be easy to reproduce. 

    Howard

    P.S. I am unmarking your suggestions as answers because they have not answered my original post.





    Wednesday, October 09, 2013 6:25 PM
  • Unfortunately I can confirm this too, the Hyper-V fixes in the general available rollup for Windows Server 2012 R2 does not solve the guest VM shutdown problem. Hopefully an urgent bug fix is already in development ?
    Monday, October 21, 2013 12:30 AM
  • Hi Alex

    This is an unbelievable bug from MS who are trumpeting WS 2012 R2's capability for Hyper-V

    I have been having the same problem but have just found a workaround. The Powershell stop-vm cmdlet DOES successfully shut down the VMs in an orderly fashion, so instead of using the host shutdown from e.g. the gui, I use Powershell to shut the VMs down first e.g. having a batch file containing e.g.

          Powershell.exe  c:\scripts\shutdown.ps1

          shutdown.exe /m hostmachinename /s /d u:6:12

    with the c:\scripts\shutdown.ps1 file containing the Powershell commands
        stop-vm -name VMname1
        stop-vm -name VMname2

    This can also be called from a scheduled task or the individual commands embedded as separate actions.

    I have checked in the VMs event log that they were successfully shut down so I know that workaround is working for me.

    Monday, October 21, 2013 10:56 AM
  • I have this problem on two new 2012 R2 servers aswell. In addition to this little problem, there is also something very wrong with the built-in backup solution, If i Configure it to backup my VMs to a network share and to do a full VSS backup it will power off all the servers that are backed up when the backup is finished, not a shut down but a "pull the plug" power off. Confirmed this on two different installations of Win 2012 R2 servers, both host and guest OS is Windows 2012R2. Anybody have a solution for this?

    Will use Swiftmans workaround to shutdown for now, also usable as a shutdown script for ups software.

    Tuesday, October 29, 2013 2:31 PM
  • Hi All,

    First - let me apologize about the fact that this bug was not caught during development.  I can confirm that this is a known issue, and we have been able to reproduce it.  We are currently looking into what we can do to get this addressed - but I cannot make any commitments at this point in time.

    If you are wondering how this issue was not detected - the primary reason is because this does not happen in a clustered configuration (if you have virtual machines configured to shutdown on host shutdown, and the host is clustered, then everything works correctly).  Though I understand that this is not a valid excuse, and we are definitely making sure we have the correct test coverage here so that this does not happen again in the future.


    Cheers,<br/> Benjamin Armstrong<br/> ============================<br/> Hyper-V<br/> Principal Program Manager Lead<br/> <br/> This posting is provided AS IS with no warranties, and confers no rights. You assume all risk for your use.

    • Marked as answer by ABitEncrypted Tuesday, October 29, 2013 6:27 PM
    Tuesday, October 29, 2013 5:59 PM
    Owner
  • Thanks Ben, for confirming this as a bug and good to know that you are on top of it.

    Looking forward to an update,

    Howard

    Tuesday, October 29, 2013 6:27 PM
  • Hi!

    Any progress on this?

    Even a workaround would be great at this point :S

    Tuesday, November 12, 2013 7:36 PM
  • Even a workaround would be great at this point :S
    Powershell: Get-VM | Stop-VM and then shutdown host system. Or you can deploy a cluster with only one node - it's supported.

    Active Directory? Ask me how.

    Wednesday, November 13, 2013 7:38 AM
  • Hi all!

    I think this issue was resolved after applying today's windows update.

    Thank you.

    Wednesday, November 13, 2013 7:49 AM
  • Hi!

    Yes, the issue is resolved with latest updates, just did test on my 2 Hyper-V servers...

    Thanks.

    **Update**

    It is NOT entirely resolved...
    I have 1 domain controller and 1 Exchange 2013.

    On Exchange 2013 I still get "Why did this computer shut down unexpectedly" warning :(

    • Edited by Grega_SLO Wednesday, November 13, 2013 8:36 AM
    Wednesday, November 13, 2013 8:34 AM
  •  We are currently looking into what we can do to get this addressed - but I cannot make any commitments at this point in time.

    Can someone post here some news/progress concerning resolution (after a month have passed by)?
    Thursday, November 28, 2013 8:07 PM
  • Hi all,

    the problem is definitely not yet solved by any regular supplied Windows Server 2012 R2 update.

    We've opened a while ago a case at MS and received the answer, that a hotfix delivered by KB2896800 will solve this critical issue. KB2896800 documents the bug well, but refers to the known (and already applied) rollup update KB2887595, which definitely does not fix this serious issues.

    Therefore I’m still claiming for a solution in this year. My company is unwilling to roll out or upgrade to Windows Server 2012 R2 Hyper-V in production with this bug.

    Thank you for working more serious on a hotfix. It’s a shame, that the regression testing at MS did not identify this bug in the preview edition, whereas some people had already reported it mid of the year.

    Neo.


    • Edited by Neodymos Sunday, December 01, 2013 3:28 PM
    Sunday, December 01, 2013 3:27 PM
  • Hi all,

    the problem is definitely not yet solved by any regular supplied Windows Server 2012 R2 update.

    We've opened a while ago a case at MS and received the answer, that a hotfix delivered by KB2896800 will solve this critical issue. KB2896800 documents the bug well, but refers to the known (and already applied) rollup update KB2887595, which definitely does not fix this serious issues.

    Therefore I’m still claiming for a solution in this year. My company is unwilling to roll out or upgrade to Windows Server 2012 R2 Hyper-V in production with this bug.

    Thank you for working more serious on a hotfix. It’s a shame, that the regression testing at MS did not identify this bug in the preview edition, whereas some people had already reported it mid of the year.

    Neo.


    Hi Neo,

    I can confirm that the hotfix KB2887595 does in fact fix the shutdown issue that I raised in my post to this forum.  Neo have you applied the hotfix to both the VM and the host OS? It was only after applying the hotfix to both that the issue was resolved.

    The operating system is shutting down at system time ‎2013‎-‎12‎-‎01T18:47:47.345738200Z.

    The operating system started at system time ‎2013‎-‎12‎-‎01T18:50:25.489177900Z.

    Howard

    Sunday, December 01, 2013 7:03 PM
  • Hi Howard,

    thanks a lot for confirming, that the problem has been fixed at your side. This was a trigger for me to have a closer look to the eventlogs of the VMs once more and I am pleased to confirm the hotfix KB2887595 seems to fix the issue!

    I'm running no Windows Server 2012 R2 neither Windows 8.1 VM, therefore there was no need to apply KB2887595 to those systems.

    The reason why I was misleaded was due to the welcome message of a DC and Forefront TMG server, which greeted with the message: "Why did this computer shut down unexpectedly ?".

    Based on this pop-up, I was sure, that the Hyper-V bug was not yet solved with the applied hotfixes. I did not have a closer look to the eventlogs of the VMs today, which I did frequently in the past. On the console of the VMs, this error message was queued and still posted, whilst the last shutdown went already smooth.

    A reboot of the Hyper-V test-environment clarified, that this serious problem finally seems to be gone. Good news for all admins.

    Neo.

    • Edited by Neodymos Sunday, December 01, 2013 9:36 PM
    Sunday, December 01, 2013 9:28 PM