Virtual Machine Stop Action in a Cluster

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