How to Set Up Failover Clustering on Windows Server 2019
Failover Clustering in Windows Server 2019 provides high availability for server roles and Hyper-V virtual machines by grouping multiple servers into a cluster. If one node fails, cluster roles automatically start on another surviving node with minimal downtime. Windows Server 2019 improves upon previous versions with support for cluster sets for scale-out deployments, two-node clusters without shared storage using Storage Spaces Direct, and Azure Site Recovery integration for cloud-based disaster recovery.
Failover Clustering Requirements
All cluster nodes must be domain-joined, run the same edition of Windows Server (Standard or Datacenter), have identical or similar hardware configurations, and share access to the same storage (for traditional shared-storage clusters) or be configured for Storage Spaces Direct (S2D). Cluster nodes must be able to communicate on all NICs and have at minimum two network adapters: one for cluster communication (heartbeat) and one for client traffic.
# Install the Failover Clustering feature on all nodes
# Run on each cluster node:
Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools
# Verify installation
Get-WindowsFeature -Name Failover-Clustering
Validating the Cluster Configuration
Microsoft requires running the Cluster Validation Wizard before creating a cluster. This test suite verifies that the hardware and software configuration meets clustering requirements. Failed tests may indicate support will not be provided for cluster issues:
# Run cluster validation (this may take 30+ minutes)
# Run from a node or management machine with clustering tools installed
Test-Cluster -Node "node01.corp.example.com","node02.corp.example.com" `
-ReportName "ClusterValidation-$(Get-Date -Format 'yyyyMMdd')"
# Run only specific test categories (faster for re-testing after changes)
Test-Cluster `
-Node "node01.corp.example.com","node02.corp.example.com" `
-Include "Inventory","Network","Storage" `
-ReportName "ClusterValidation-Storage"
# The report is saved to C:WindowsclusterReports by default
# Review the HTML report for failures and warnings
Creating the Failover Cluster
Create the cluster from one of the future cluster nodes. The cluster will be assigned a name and IP address — these become the Cluster Network Name object in Active Directory and DNS:
# Create a two-node failover cluster
New-Cluster `
-Name "CLUSTER01" `
-Node "node01.corp.example.com","node02.corp.example.com" `
-StaticAddress 192.168.1.50 `
-AdministrativeAccessPoint ActiveDirectoryAndDns
# Create a cluster without shared storage (for Storage Spaces Direct)
New-Cluster `
-Name "S2DCLUSTER01" `
-Node "node01.corp.example.com","node02.corp.example.com" `
-StaticAddress 192.168.1.60 `
-NoStorage
# Verify the cluster was created
Get-Cluster -Name CLUSTER01
Get-ClusterNode -Cluster CLUSTER01
Configuring Cluster Quorum
Quorum determines how many nodes must be online for the cluster to continue operating. Without quorum, the cluster stops to prevent split-brain scenarios where multiple partitioned cluster portions simultaneously claim ownership of resources:
# View current quorum configuration
Get-ClusterQuorum -Cluster CLUSTER01
# Configure a Disk Witness (shared disk for quorum vote - traditional clusters)
# The disk witness is a small shared disk (512 MB to 1 GB) on the shared storage
Set-ClusterQuorum -Cluster CLUSTER01 -NodeAndDiskMajority "Cluster Disk 1"
# Configure a File Share Witness (recommended for two-node clusters)
# Create the share on a server not in the cluster (e.g., file server or DC)
New-SmbShare -Name "CLUSTER01-Witness" -Path "C:ClusterWitnessCLUSTER01" -FullAccess "CORPCLUSTER01$"
Set-ClusterQuorum -Cluster CLUSTER01 -NodeAndFileShareMajority "\fs01.corp.example.comCLUSTER01-Witness"
# Configure a Cloud Witness (Azure Blob Storage - recommended for modern deployments)
# Requires an Azure Storage Account
Set-ClusterQuorum -Cluster CLUSTER01 `
-CloudWitness `
-AccountName "clusterstorage01" `
-AccessKey "StorageAccountAccessKey=="
# Verify quorum configuration
Get-ClusterQuorum | Select-Object Cluster, QuorumType, QuorumResource
Configuring Cluster Networks
Configure which networks the cluster uses for different purposes. Separate heartbeat (cluster communication) from client traffic to prevent noise from client traffic affecting node heartbeats:
# View all cluster networks
Get-ClusterNetwork -Cluster CLUSTER01
# Set the role of each network
# Role 1 = Cluster only (heartbeat)
# Role 2 = Client only (application traffic)
# Role 3 = Cluster and Client (both)
Get-ClusterNetwork -Cluster CLUSTER01 -Name "Cluster Network 1" | `
Set-ClusterNetwork -Role 1 -Name "Heartbeat"
Get-ClusterNetwork -Cluster CLUSTER01 -Name "Cluster Network 2" | `
Set-ClusterNetwork -Role 3 -Name "Client Traffic"
# Configure network priority for cluster communication
(Get-ClusterNetwork -Cluster CLUSTER01 -Name "Heartbeat").Metric = 100
(Get-ClusterNetwork -Cluster CLUSTER01 -Name "Client Traffic").Metric = 1000
Adding Shared Storage to the Cluster
For traditional file server or SQL Server clusters, add shared iSCSI or Fibre Channel storage that all nodes can access:
# View available cluster disks (disks connected to all nodes)
Get-ClusterAvailableDisk -Cluster CLUSTER01
# Add all available disks to the cluster
Get-ClusterAvailableDisk -Cluster CLUSTER01 | Add-ClusterDisk
# List all cluster disks
Get-ClusterResource -Cluster CLUSTER01 | Where-Object {$_.ResourceType -eq "Physical Disk"}
# Move a cluster disk between nodes for maintenance
Move-ClusterResource -Name "Cluster Disk 1" -Node "node02"
Creating a Clustered File Server Role
A clustered file server provides continuously available SMB shares that automatically fail over to another node if the hosting node fails:
# Add the File Server role to the cluster
Add-ClusterFileServerRole `
-Name "FS-Cluster01" `
-Storage "Cluster Disk 1" `
-StaticAddress 192.168.1.55 `
-Cluster CLUSTER01
# Verify the clustered file server
Get-ClusterResource -Cluster CLUSTER01 | Where-Object {$_.OwnerGroup -eq "FS-Cluster01"}
# Create an SMB share on the clustered file server
# (Add to the clustered disk, not to the node directly)
New-SmbShare `
-Name "ClusteredShare" `
-Path "G:ClusteredData" `
-ScopeName "FS-Cluster01" `
-FullAccess "CORPDomain Admins" `
-ChangeAccess "CORPDomain Users"
Configuring Clustered Hyper-V (VM High Availability)
Make Hyper-V VMs highly available by running them on a Failover Cluster. If the host node fails, the VM restarts on another node automatically:
# Add a VM to the cluster (make it a clustered role)
Add-ClusterVirtualMachineRole -VMName "WEB01" -Cluster CLUSTER01
# Configure VM failover settings
$clusterVM = Get-ClusterGroup -Cluster CLUSTER01 -Name "WEB01"
# Set preferred node
Set-ClusterOwnerNode -Group "WEB01" -Owners "node01","node02" -Cluster CLUSTER01
# Configure auto-failback after a node comes back online
$clusterVM.AutoFailbackType = 1 # 1 = auto-failback on
$clusterVM.FailbackWindowStart = 2 # 2 AM
$clusterVM.FailbackWindowEnd = 4 # 4 AM
# Perform a live migration test
Move-ClusterVirtualMachineRole -Name "WEB01" -Node "node02" -MigrationType Live
# View all clustered VMs
Get-ClusterGroup -Cluster CLUSTER01 | Where-Object {$_.GroupType -eq "VirtualMachine"} | `
Select-Object Name, OwnerNode, State
Monitoring Cluster Health
# View cluster overall health
Get-ClusterNode -Cluster CLUSTER01 | Select-Object Name, State, NodeWeight
# View cluster resource health
Get-ClusterResource -Cluster CLUSTER01 | Select-Object Name, State, ResourceType, OwnerNode
# View cluster event log
Get-WinEvent -LogName "Microsoft-Windows-FailoverClustering/Operational" -MaxEvents 50 | `
Where-Object {$_.LevelDisplayName -ne "Information"} | `
Select-Object TimeCreated, LevelDisplayName, Message
# Check cluster validation warnings
Test-Cluster -Node "node01","node02" -Include "Inventory" -ReportName "HealthCheck"
# View cluster shared volume (CSV) status for Hyper-V clusters
Get-ClusterSharedVolume -Cluster CLUSTER01 | Select-Object Name, State, OwnerNode
# Simulate node failure for testing (drain and pause a node)
Suspend-ClusterNode -Name "node01" -Drain -ForceDrain -Cluster CLUSTER01
# Resume the node after testing
Resume-ClusterNode -Name "node01" -Failback Immediate -Cluster CLUSTER01
Failover Clustering is the foundational HA technology for Windows Server. Combine it with Storage Spaces Direct for a hyper-converged infrastructure that eliminates shared SAN as a single point of failure, or with traditional shared storage for workloads that require it. Always validate cluster configuration changes with Test-Cluster, maintain at minimum two nodes in every cluster, and document the failover procedures so they can be executed quickly and correctly during an incident.