We help IT Professionals succeed at work.

Server 2012 R2 hyper-v VM won't auto restart

markperl1
markperl1 asked
on
The Automatic Start Action is set is to "Always start this virtual machine automatically." I have a time delay of 3 min.

The VM will not auto restart when the host is restarted, and I have to start it manually.

???

Thanks

Mark
Comment
Watch Question

Distinguished Expert 2018

Commented:
What is your shutdown action? There was a bug (patched) in 2012 R2 where VMs were not being shut down cleanly if that was your selected action. Pausing VMs (which I recommend anyays) worked fine. So if you haven't fully patched and you are choosing to have hyper-v shut down VMs during a restart, you may be hitting this bug.

Author

Commented:
Server is fully patched, and this occurs during  a normal restart of the host. The VM's auto-restart had previously worked just fine! I would not normally shut down the VM before restarting the host.
Distinguished Expert 2018
Commented:
I am not talking about *you* shutting down the VM before restarting the host.  I am referring to the "automatic stop action" that can be set per VM.  If you set it to save (pause) then all works well.  The "shut down the guest" has/had a bug that doesn't work right, and seems isolated to 2012 R2.  I have not read/heard that this bug also impacts "turn off the virtual machine" setting, but since that doesn't initiate a graceful shutdown *or* save/pause the VM, I've never seen that used in production either, so it very well could.  I'll see if I can dig up the KB article, as it may still be a hotfix-only release, but I thought it was a fully released patch a few months back...

But, as I said, if you set the automatic stop action to save then you never hit this bug anyways.  So other VMs and other machines configured differently (or 2008 R2/2012 non-R2) won't exhibit this behavior.
Distinguished Expert 2018

Commented:
Check your update history and make sure you have KB2887595 installed.  If not, install it.

Author

Commented:
Aha! That's what it was. Someone else had been doing some maintenance on the server and changed the Stop Action to Shutdown. Thank you!