In order to create high-availability scenarios, Windows Server 2016 provides the Failover Clustering feature, which allows you to put roles or virtual machines into a high-availability solution.
When installed and configured, Failover Clustering uses Failover Cluster Management Tools to bring all necessary cluster components, such as storage, network, roles, and nodes, together into a single console.
Failover Clustering is a Windows feature that creates a group of servers called nodes, which are put together in a virtual space. A cluster is formed by nodes, storages, network devices, and the failover cluster itself (which acts as the management software) to bring all these components under just one console. All users and services that use the cluster connect to the virtual name created by Failover Clustering; however, this virtual entity can contain many nodes (up to 64) in the same cluster. In case one of the active nodes fails, the cluster services, such as virtual machines, will be started on another node, allowing you to deliver a high-availability scenario.
Failover Clustering is not a new feature in Windows. It has been present since the first Windows Server version. However, the new version of Windows Server 2016 brings heaps of features, such as:
These improvements make deployment, troubleshooting, and management much easier, helping you to deliver a reliable high-availability environment.
In this recipe, you will see how to install the Failover Clustering feature and how to create a cluster to support Hyper-V virtual machines.
In previous versions of Windows, Failover Clustering needed an Active Directory (AD) environment, requiring all nodes to be members of the same AD domain. Windows Server 2016 introduces support for Workgroup and Multi-domain clusters, thus breaking these ties with the preceding Active Directory dependencies. You can now create failover clusters in the following configurations:
Before you begin, you also need to configure all storage and access within the nodes that will be used in the cluster. Check whether the disks are available on all nodes that will be members of the cluster.
If you want to use the cluster for virtual machines, make sure you have installed the Hyper-V role on all nodes that will participate in the cluster.
The following steps will demonstrate how to install the Failover Clustering components and how to create a new cluster:
After going through the easy Failover Clustering installation, the system installs all core features, tools, and PowerShell modules, to enable its administration.
One of these tools is Failover Cluster Management Tools. It allows you to manage not only the cluster, but also its components, such as roles, nodes, storage, and networks. From a single view, you can carry out tasks such as adding a new disk, changing network settings, managing cluster roles, and much more. For virtual machines in a clustered environment, once the Hyper-V servers are members of a cluster, many of the actions you are used to performing in Hyper-V Manager (such as securing updates and correcting configuration among the cluster nodes) should be carried out through Failover Cluster Manager.
The wizard to create a new cluster is very straightforward. You basically need to select which server will act as a node in your cluster, specify the cluster name and the IP address, and it's done. To make it even simpler, helping you to identify any error or misconfiguration that can compromise the cluster, Validate a Configuration Wizard is launched when your first cluster is created. It allows you to check tons of components and settings on every node, storage, network, and system configuration, and in Hyper-V. You won't be able to continue if the report shows any failed tests. You will need to correct the issue before you can create a failover cluster that is supported. You can rerun the validation tasks whenever you want, including for existing clusters, in case some update is made. All cluster reports are saved in C:WindowsClusterReports
on each node. These reports are important, and have to be kept in case you need them for errors or problems you might have in the future.
To add a virtual machine to the cluster, you need to create it from Failover Cluster Manager by right-clicking on Roles. It's recommended that you manage all virtual machines running in failover clusters by using Failover Cluster Manager rather than Hyper-V Manager.
Once you have created your virtual machines, they will be in a high-availability system managed by Failover Clustering.
Protected Networks, which is enabled on a per-virtual-machine basis, is a feature first introduced in Windows 2012 R2 that is supported by Failover Clustering, when you deploy a Hyper-V-enabled cluster. The cluster monitors the network connection of the VM and, if network connectivity is lost, the VM is live-migrated to another node in the cluster, with no perceivable downtime incurred. Protected Networks is enabled by default. You can view this feature by looking at the Properties of an existing VM and expanding the Advanced features of the desired attached virtual NIC. You can also verify that this feature is enabled by running the following PowerShell commandlet:
Get-ClusterGroup <Insert VM Name> |Get-VM | Get-VMNetworkAdapter | FL VMName,SwitchName,MacAddress,ClusterMonitored
Like any other feature of Windows Server 2016, Failover Clustering can also be managed by using PowerShell. The PowerShell module for Failover Clustering is installed automatically with feature installation.
To list all available Failover Clustering commandlets, type the following command:
Get-Command –Module FailoverClusters
To see how easy is to manage Failover Clustering using PowerShell, look at the next example, which shows how to create a cluster with the same details as the one demonstrated in this recipe. The New-Cluster
commandlet creates a new cluster, called HVCluster01
, with the static IP address 192.168.1.09, and also adds two nodes with the names node01
and node02
:
New-Cluster –Name HVCluster01 –StaticAddress 192.168.1.09 –Node node01,node02
To check all cluster details, type the following command:
Get-Cluster | Format-List –Property *
3.17.162.247