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:
- Open the Failover Cluster Manager
- Go to Roles and select the virtual machine in question
- Change to the Resources tab at the bottom of the screen
- Select the Virtual Machine resource, right click on it, and select Properties
- Change to the Settings tab of the properties dialog
- Configure the Virtual machine stop action
- If you want the virtual machine to stay off if a user turns it off, select Take resource offline until virtual machine restarts.
- If you want the virtual machine to restart automatically select Mark resource as failed.
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.