Implementing Failover Clustering with Windows Server 2016 Hyper-V
In the previous article, you have configured Configuring iSCSI Storage and Initiator in Windows Server 2016. Here you can configure Implementing Failover Clustering with Windows Server 2016 Hyper-V. A failover cluster is a group of two or more computers working together to increase the availability of a clustered services or applications. To make virtual machines highly available in Hyper-V environment, we must implement failover clustering on the Hyper-V host servers. Windows Server 2016 Hyper-V comes with a number of new features and improvements for Hyper-V high availability and virtual machine mobility. In this article, I will walk you through everything we need to do to build Hyper-V failover cluster including how to validate, create, manage and test our high availability VMs via Failover Cluster Manager. You can build a two-node failover cluster using iSCSI Target Windows Server, using five Networks for failover cluster network.
To implement failover clustering for Hyper-V, you should do the following steps:
- Configure shared storage
- Install the Hyper-V and Failover Clustering features on both physical computers
- Validate the Cluster Configuration
- Create the cluster
- Configure Disks for a Failover Cluster
- Create a highly available virtual machine in one of the cluster nodes
- Make the virtual machine highly available ( for an existing virtual machine)
- Simulating an Unplanned Failover
- Simulating a Planned Failover
1. Configure Shared Storage:
Please refer my previous article, http://www.msserverpro.com/configuring-iscsi-storage-initiator-windows-server-2016/
2. Install the Hyper-V and Failover Clustering features on both physical computers:
Please refer my previous article, http://www.msserverpro.com/implementing-windows-server-2012-hyper-v-failover-clustering/
3. Validate the Cluster Configuration:
1. On KTM-HOST1, in Server Manager, click Tools, and then click Failover Cluster Manager. In Failover Cluster Manager, in the center pane, under Management, click Validate Configuration….
2. On the Before You Begin page of the Validate a Configuration Wizard, read the information, and then click Next.
3. On the Select Servers or a Cluster page, in the Enter name text box, type KTM-HOST1 and KTM-HOST2, and then click Add.
4. Verify the Selected servers: entries, and click Next.
5. On the Testing Options page, select the Run only tests I selected and click Next.
6. On the Test Selection page, verify that all Test Selection options are selected and click Next.
7. On the Confirmation page, click Next.
8. Validating Test is currently running…
9. On the Summary page, click on View Report to view the Failover Cluster Validation Report..
10. On the Summary page, after viewing the Failover Cluster Validation Report click Finish.
4. Create the Cluster:
1. In Failover Cluster Manager, 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 figure.
2. On the Before You Begin page of the Create Cluster Wizard, read the information, and then click Next.
3. On the Select Servers page, in the Enter server name text box, type the servers you want to add into your cluster, and then click Add. Verify the Selected servers entries, and click Next.
4. On the Access Point for Administering the Cluster page, in the Cluster Name text box, type KTMHVCLUSTER. A Cluster name object will be created in AD. In the Address text box, type 168.0.110, and then click Next.
5. 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. Creating New Cluster start…
6. When the new cluster creation finishes, click on View Report to see detailed information about the creation, and click on Finish.
In Failover Cluster Manager Console, expand KTMHVCLUSTER.msserverpro.com, click on Nodes, in the center pane, verify that Nodes status are Up.
5. Configure Disks for a Failover Cluster:
1. In Failover Cluster Manager Console, expand msserverpro.com, expand Storage click Disks. Verify that all disks display as available for cluster storage in Failover Cluster Manager. Click Cluster Disk 1. Right-click that disk, and click Add to Cluster Shared Volumes.
2. Cluster Disk 1 will now be listed and accessed in the path C:\ClusterStorage\Volume1 as shown given below. To see the available disks within the CSV, open Windows Explorer and navigate to the folder C:\ClusterStorage.
3. Right-click msserverpro.com, click More Actions, click Configure Cluster Quorum Settings.
4. On the Before You Begin Configure Cluster Quorum Wizard, click Next.
5. On the Select Quorum Configuration Option page, click Use default quorum configuration, and then click Next.
6. On the Confirmation page, click Next.
7. On the Summary page, click Finish.
6.Configuring a highly available virtual machine:
1. In Failover Cluster Manager, right-click on Roles, select Virtual Machines.. and click New Virtual Machines..
2. Select KTM-HOST1 as the cluster node, and click OK.
3. In the New Virtual Machine Wizard, on the Before You Begin page, click Next.
4. On the Specify Name and Location page, in the Name text box, type KTM-TESTVM, click Store the virtual machine in a different location, and then click Browse. Browse to and select C:\ClusterStorage\Volume1, and click Select Folder. Click Next.
5. On the Specify Generation page, click Generation 2, and then click Next.
6. On the Assign Memory page, type 2048, select Use Dynamic Memory for this virtual machine and then click Next.
7. On the Configure Networking page, click Service Network, and then click Next.
8. On the Connect Virtual Hard Disk page, click Create a virtual hard disk, and verify the virtual hard disk location and click Next.
9. On the Installation Options page, select Install an operating system later and click Next.
10. On the Completing the New Virtual Machine Wizard page, click Finish.
11. On the Summary page of the High Availability Wizard, click Finish.
12. Ensure that the machine creates successfully.
8.Simulating an Unplanned Failover:
To test an unplanned failover of the highly available (HA) virtual machine, you can stop the Cluster service on the node that owns the HA virtual machines.
1. In the Failover Cluster Manager console, expand Nodes, Right-click on one of the node to test Unplanned Failover, point to More Actions and then click Stop Cluster Service.
2. Verify that the virtual machine moves to the next node. This might take a short delay while this process.
3. After finished the testing of an unplanned failover, start the Start Cluster Service of KTM-HOST1..
9. Simulating a Planned Failover:
To simulate a planned failover, you can move the clustered virtual machine to another node. You have the following options to move a clustered virtual machine: Live Migration, Quick Migration and Storage Migration. For more details on simulating a planned failover, you will get upcoming article.
Failover clustering with Hyper-V is essential to high availability and resilient systems that are at the heart of your business. Windows Server 2016 Hyper-V provides interesting and friendly options for adding Hyper-V high availability and virtual machine mobility to your virtual machines. This exercise will help IT professionals get their experience for the failover scenario that they may encounter during their career.
Thanks for sharing. I’ve found this very helpfull in setting up a lab.
Excellent and thorough guide
I would like to find out currently we are working on cluster 2016.
i do have Node1 with ip ,Node2 with ip and do have “Virtual Name but no ip address”
I created computer object in AD for the virtual name.
Do you think i can create cluster without the virtual ip address and how can i get the ip address for virtual name during the setup ?