Virtual Machine Stop Action in a Cluster

Virtual Machine Stop Action in a Cluster

Rate This
  • Comments 1

One of the interesting philosophical debates on the Hyper-V team is “What is the right thing to do when a user stops a clustered virtual machine?”.  Some of us believe that if the user asked to stop the virtual machine – then we should stop the virtual machine (which is what we do by default).  But others believe that if the virtual machine is clustered, it should be restarted automatically, in order to deliver the highest uptime (this is actually what we used to do in the first release of Hyper-V).

What most people do not realize is that this is actually something that you can configure.  To do this you need to:

  1. Open the Failover Cluster Manager
  2. Go to Roles and select the virtual machine in question
  3. Change to the Resources tab at the bottom of the screen
  4. Select the Virtual Machine resource, right click on it, and select Properties
  5. Change to the Settings tab of the properties dialog
  6. Configure the Virtual machine stop action
    1. If you want the virtual machine to stay off if a user turns it off, select Take resource offline until virtual machine restarts.
    2. If you want the virtual machine to restart automatically select Mark resource as failed.

image

Note, no matter what setting you choose – stopping a virtual machine through the failover cluster manager will stop the virtual machine.  This setting effects what happens when someone uses Hyper-V Manager or Hyper-V PowerShell to stop a virtual machine.

Cheers,
Ben

Leave a Comment
  • Please add 3 and 4 and type the answer here:
  • Post
  • Hi Ben,

    Thanks for this post. I was trying to clear up some confusion

    We have a 2 Node - Windows 2012 R2 Hyper-V Cluster with a load of 2012/2012 R2 Guest VM's running on it. All fine.

    In Hyper-V Manager on each node, the Automatic Stop Action for these servers (which are all on CSV storage of course) is to 'Shut down the guest VM' but what we want to ensure is if we shut down a node of our Hyper-V Cluster gracefully (for example to install more physical memory into it) we want the Guest VM's to fail over to the other Node and not actually shut down

    Looking at your post and TechNet the 'Mark resource as failed' will move it permanently to another node in the cluster regardless of the fact the Automatic Stop Action on the Guest VM is set to 'Shut down guest VM'

    Is this correct?

    There is no option in the Automatic Stop Action under Hyper-V Manager that seems to be aware its on a cluster so offers a different choice like 'Move to other node' :)

    Cheers

    Andy

Page 1 of 1 (1 items)