Installing and configuring the Windows Failover Clustering feature

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:

  • Cluster operating system rolling upgrade
  • Storage replica
  • Cloud Witness
  • Workgroup and multi-domain clusters
  • Virtual-machine resiliency
  • Diagnostic improvements in Failover Clustering
  • Site-aware Failover Clusters
  • Virtual-machine node fairness
  • Simplified SMB multichannel and multi-NIC cluster networks

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.

Getting ready

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:

  • Single-domain Clusters (here, cluster nodes are all joined to the same AD domain)
  • Multi-domain Clusters (here, cluster nodes are members of different AD domains)
  • Workgroup Clusters (here, cluster nodes are member servers, belong to a workgroup, and are not AD domain-joined)

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.

How to do it…

The following steps will demonstrate how to install the Failover Clustering components and how to create a new cluster:

  1. To install the Failover Clustering feature, open Server Manager from the taskbar.
  2. In Server Manager, click on Manage and select Add Roles and Features.
  3. On the Before You Begin page, click on Next four times.
  4. On the Select features screen, check the Failover Clustering checkbox, as shown in the following screenshot:
    How to do it…

    Add Roles and Features – Failover Clustering

  5. In the Add Roles and Features Wizard window, click on Add Features to add the required features to manage Failover Clustering.
  6. Click on Next in the Select features window, and then click on Install.
  7. To open the Failover Cluster Manager console in Server Manager, click on All Servers in the left-hand pane, right-click on the server you want to open, and select Failover Cluster Manager.
  8. By default, there is no cluster created. To create a new cluster, select one of the three Create Cluster options in Failover Cluster Manager, as shown in the following screenshot:
    How to do it…

    Failover Cluster Manager – Create Cluster

  9. Click on Next in the Before You Begin section in the Create Cluster Wizard window.
  10. In the Select Servers section, type the servers you want to add into your cluster, click on Add, and then click on Next. All added servers must have the Failover Clustering feature installed already.
  11. In Validation Warning, select Yes, When I click Next, run configuration validation tests, and then return to the process of creating the cluster, and click on Next. A Validate a Configuration Wizard screen will be launched.
  12. On the Before You Begin page, click on Next.
  13. In Testing Options, select Run all tests or Run only tests I select to run only a single test in case of running for the second time to fix an issue. For the first test, it is recommended that you select Run all tests, as shown in the following screenshot:
    How to do it…

    Failover Cluster Manager – Validating the cluster

  14. In the Confirm information selections section, click on Next to start the tests.
  15. The validation tests will start to run and check all potential problems. When finished, click on View Report to see all results with success, warning, and error messages.
  16. Use the report to identify any error or warning, and click on Finish.
  17. Correct the errors and warnings mentioned in the report, and run it again to make sure they are solved.
  18. Back on the Create Cluster Wizard screen, in the Access Point for Administering the Cluster section, specify the name you want to use for your cluster, in Cluster Name. A cluster name object will be created in AD, in the same organizational unit that the nodes sit in.
  19. On the same page, select the network and IP address for the cluster name and click on Next, as shown in the following screenshot:
    How to do it…

    Failover Cluster Manager – Cluster name plus cluster access point

  20. On the Confirmation page, check the Add all eligible storage to the cluster checkbox, if you want to automatically add all available storage in the nodes, and click on Next. The process to create a new cluster will start.
  21. When the new cluster creation finishes, click on View Report to see detailed information about the creation, and click on Finish.
  22. To add a virtual machine to your cluster, right-click on Roles, select Virtual Machines, and click on New Virtual Machine.
  23. Select the node you want to create the new virtual machine in, follow the wizard, and click on Finish.
  24. The new cluster will be listed in Failover Cluster Manager. To add, remove, or configure advanced settings for nodes, click on Nodes, in the left-hand pane.
  25. To manage, add, or change the disks or pools, click on Storage, in the left-hand pane.
  26. To manage the network and network connections, click on Networks node, right-click the Cluster Network, and select Properties.

How it works…

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

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

There's more…

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 *

See also…

  • The Enabling the Hyper-V role recipe in Chapter 1, Installing and Managing Hyper-V in Full, Server Core Mode or Nano Server
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.162.247