How to Properly Shutdown a Failover Cluster or a Node

How to Properly Shutdown a Failover Cluster or a Node

Rate This
  • Comments 11

This blog will discuss the proper process for shutting down an individual node in a Windows Server 2012 R2 Failover Cluster or the entire cluster with all the nodes.  Note:  While the steps outlined will be specific to Windows Server 2012 R2, the process applies to a cluster of any OS version.

Shutting Down a Node

When shutting down or rebooting a node in a Failover Cluster, you first want to drain (move off) any roles running on that server (such as a virtual machine).  This ensures that the shutting down of a node is graceful to any applications running on that node.

  1. Open Failover Cluster Manager (CluAdmin.msc)
  2. Click on “Nodes”
  3. Right-click on the node name and under ‘Pause’ click on ‘Drain Roles’
  4. Under Status the node will appear as ‘Paused’.  At the bottom of the center pane click on the ‘Roles’ tab.  Once all roles have moved off this node, it is safe to shut down or reboot the node.

 

To resume the node after it has been restarted…

When the node is once again powered on and ready to be put back into service, use the Resume action to re-enable the node to host roles.

  1. Open Failover Cluster Manager (CluAdmin.msc)
  2. Click on “Nodes”
  3. Right-click on the node name and select ‘Resume’, then select either:
    1. Fail Roles Back’ – This will resume the node and move any roles which were running on the node prior to the node back.  Caution:  This could incur downtime based on the role
    2. Do Not Fail Roles Back’ – This will resume the node and not move any roles back.

 

 

Shutting Down a Node with Windows PowerShell®

  1. Open a PowerShell window as Administrator
  2. Type:  Suspend-ClusterNode -Drain
  3. Type:  Get-ClusterGroup
    1. Verify that there are no roles listed under “OwnerNode” for that node
    2. This could be scripted with the following syntax: 
      PS C:\> (Get-ClusterGroup).OwnerNode –eq "NodeBeingDrained"
  4. Shutdown or restart the computer by typing either:
    1. Stop-Computer
    1. Restart-Computer

To resume the node after it has been restarted…

  1. Open a PowerShell window as Administrator
  2. Type:  Resume-ClusterNode
    1. If you wish to fail back the roles which were previously running on this node type:

PS C:\> Resume-ClusterNode –Failback Immediate

 

Shutting Down a Cluster

Shutting down the entire cluster involves stopping all roles and then stopping the Cluster Service on all nodes.  While you can shut down each node in the cluster individually, using the cluster UI will ensure the shutdown is done gracefully.

  1. Open Failover Cluster Manager (CluAdmin.msc)
  2. Right-click on the cluster name, select ‘More Actions’, then “Shut Down Cluster…”
  3. When prompted if you are sure you want to shut down the cluster, click “Yes”

Shutting Down a Cluster with PowerShell

  1. Open a PowerShell window as Administrator
  2. Type:  Stop-Cluster

Controlling VM Behavior on Shutdown

When the cluster is shut down, the VMs will be placed in a Saved state.  This can be controlled using the OfflineAction property to change the default for all VMs or at an individual VM level.

To configure the shut down action for an individual VM:

PS C:\> Get-ClusterResource "Virtual Machine" | Set-ClusterParameter OfflineAction 1

To configure the default shut down action for all VMs:

PS C:\> Get-ClusterResourceType -Name "Virtual Machine" | Set-ClusterParameter OfflineAction 1

 Value

 Effect

 0

 The VM is turned off

 1 (default)

 The VM is saved

 2

 The guest OS is shut down

 3

 The guest OS is shut down forcibly

To start the cluster after it has been shut down

  1. Type:  Start-Cluster

Thanks!
Elden Christensen
Principal Program Manager Lead
Clustering & High-Availability
Microsoft

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

    I've a quick Question...Can you please explain technical differences between drain (move off) and manual Failover of all the individual services? For example, Let's say..I've a Clustered SQL Server Instance, what's difference does it make from SQL Server perspective if I failover SQL services to the otehr node and reboot the node vs Drain Roles and reboot the node?

  • Putting a node into maintenance mode by invoking the node drain is a management paradigm.  Technically under the covers it exactly the same thing as going and manually discovering all the groups on a node and then manually issuing a group move.  Drain just makes it easier... it's a single click action.  But either way works, so do what you prefer.

    Thanks!

    Elden

  • Thanks Elden for the clarification...

  • Thanks Elden for sharing the same ...

  • Does shutting an hyper-v cluster stop all running VMs?

  • Hi Elden Christensen,

    Thanks for good Artical about How to Properly Shutdown a Failover Cluster or a Node.

    I am planning to learn from scrarch Could you please provide the PDF file on Clustering on Windows 2008 server.

    Please find my personal Mail ID: urramana@hotmail.com.

    Thanks & Reagrds,

    S.V.Ramana.

  • Just wanted to echo Antonio's question

    If I shutdown the whole cluster (mine is full of Hyper-V VMs) what happens to the wirtual machines?

    Do they save their state or us SCVMM or native Hyper-V rules?

  • Is there a GUI process in failing over a Windows 2008 cluster to other node?Just like how it was handled in Windows 2003 clusteramdin?

  • Is there a best practice for bringing a cluster back online?

  • Hello Elden,

    I have an Windows 2012R2 failover cluster and the Active Directory was made high available due to the fact that from 2012 the cluster can boot-up without the AD. I tested this in case a hard-reset the physical machines and it works.

    But if I manually shutdown the cluster, how can I start-up a cluster back again? Because I can start-up the cluster if I'm not authenticated on a Domain.

    Thanks,

    Mihai

  • Hi,

    I only see the start command via powershell. Is it possible to start via failover cluster manager?

Page 1 of 1 (11 items)