What is Hyper-V clustering
Hyper-V clustering is a connected unit of independent computers, and it’s a feature of Windows Server designed to protect virtual machines in the event of a failure. When a physical server in the cluster fails, another server will take over the services of the failed one, so this transferring process is called failover.
The role of Hyper-V clustering is to actively monitor the hosts within the cluster to see if they are working properly. The Hyper-V cluster includes a maximum of 64 nodes, and each cluster can have up to 8.000 virtual machines. With Hyper-V failover cluster, the perceived downtime will be very short, thus greatly increasing the availability of Hyper-V.
Hyper-V clustering vs Hyper-V replica
Hyper-V clustering and Hyper-V replica are completely different solutions implemented to solve different problems.
Failover clusters are used for business continuity and Hyper-V replications are commonly used for disaster recovery. So, they are supporters for each other instead of adversaries.
Hyper-V cluster enables Hyper-V virtual machines to failover automatically in case of failures. However, Hyper-V replica can only support to enable failover manually for VMs. Besides, Hyper-V clustering does not lose data while transferring failover, but it is possible for replica to lose part of data.
However, not everyone should use Hyper-V clustering, you’d better choose a solution based on your needs. If you do not want to investigate additional costs for extra hardware and shared storage, Hyper-V replica is still a good choice for you. Meanwhile, learning how to set up Hyper-V replica is much easier than deploying a complex cluster system.
Benefits of Hyper-V failover cluster
Hyper-V clustering copes with planned and unplanned failovers effectively, which contributes to reducing shutdown time of servers and improve business continuity.
Planned failover: For example, VM data migration or maintenance, software upgrade, etc. Using planned failover in Hyper-V benefits to reducing downtime and increase availability.
Unplanned failover: In the case of unplanned events such as unexpected power outage, a natural disaster or virus attack, unplanned failover automatically take over the services on this server to reduce the downtime caused by hardware or software failure and the impact on business continuity.
Requirements for Hyper-V failover cluster
Before enabling failover clustering, you must verify that your software and hardware settings are compatible with Hyper-V clustering technology.
Shared Storage: If you plan to use a failover cluster in Hyper-V, you need to configure shared storage for the failover cluster first. Direct Attached Storage, iSCSI Storage, Storage Area Networking (SAN) and SMB 3.0 protocol (for Windows Server 2012 and later) are available to Shared storage.
Among them, you can use iSCSI introduced in Windows Server 2012 R2 to set up an "iSCSI target server". It saves the budget and fits who want to validate the cluster's functionality in a test environment.
CPU: It is recommended to use CPUs with native virtualization supports, and it’s better to use CPUs with same or similar components instead of different CPUs such as from Inter to AMD, since migration on different CPUs may lead to cluster failure.
Hyper-V Cluster Networking: Cluster nodes should be connected by some network in events of a single point of failure, so you need to configure identical communication setting on the same network adapters.
OS settings: Windows servers should be in the same domain, and have installed Hyper-V and failover cluster roles.
How to set up failover cluster in Hyper-V step by step
After checking these requirements, you can go to create the Hyper-V failover Cluster. Please refer to the following steps to know how to set up Hyper-V failover cluster in Windows Server 2016.
Please run a validation test first of the cluster configuration in the Failover Cluster Manager.
1. Open Server Manager, and click Tools to select Failover Cluster Manager.
2. Click Validate Configuration and do the following:
3. In the opened wizard, click Browse to specify the Servers you want in the clustering.
4. At the end of validation, you can check whether there are any errors, and if you click View Report, it would generate a huge report describing every single problem. Then click Finish.
After finish the validation configuration, please go to create a new Hyper-V failover cluster now.
1. In the Failover Cluster Manager, navigate to Create Cluster.
2. In Select Server part, enter a name for the server or click Browse >> Advanced >> Find Now, then enter network credentials and click OK.
3. In the Access Point for Administering the Cluster section, type a name for the new cluster and provide an available IP address, then click Next.
4. Confirm the information is correct, and select Add all eligible storage to the cluster, then click Next.
5. Then it starts configuring the new cluster, and the process may take a while.
6. Click Finish to complete configuration.
Here, you have set up a failover cluster in Hyper-V.
The Failover Cluster Manager contains 5 important components: roles, nodes, storage, network, and cluster events. In daily operations and maintenance, you are often exposed to the creation, deletion, and modification of various roles and functions. So, use failover clusters efficiently in Hyper-V will be very helpful to your work.
To improve the availability of failover clusters, the following part will introduce how to add a disk to store virtual machine data and how to create a highly available virtual machine.
How to add disks in Hyper-V failover cluster
Navigate to the Failover Cluster Manager, you can notice that failover cluster requires disk for storage.
Click Storage >> Disks >> Add Disk, check the available iSCSI disks and specify disks you need, then click OK.
The disks are added into the cluster and they are all online. You could right click on a disk and choose Add to Cluster Shared Volumes.
How to create a highly available virtual machine
1. Click Roles >> Virtual Machines >> New Virtual Machines >> Next.
2. Specify Name and Location: enter a name for the VM, then select Store the virtual machine in a different location, and click Browse to choose the shared storage.
3. Specify Generation, you can choose Generation 1 to maintain compatibility better, then configure the suitable amount of memory and select Use Dynamic Memory for this virtual machine.
4. Click Create a virtual hard disk and enter a name and location, then specify the size of hard disk.
5. Click Install an Operating System Later >> Finish.
Is backup necessary in Hyper-V clustering
Setting up Hyper-V clustering aims to protect data security. When you perform failover cluster, you may notice that it also has drawbacks. So, for enterprise that requires a high level of security, is there an efficient way to overcome these shortcomings?
Backup is the best solution. As you know, backup is a traditional and secure way to protect virtual machines in Hyper-V.
Here, I will use a professional and free Hyper-V backup software - AOMEI Cyber Backup. It offers centralized management of multiple devices, and saves additional cost on storage.
- Schedule backup tasks: It helps to back up virtual machine data automatically, and delete old backup files regularly.
- Easy-to-use: backup and restore multiple virtual machines via central console without complicated configuration and reinstallation.
- Economical cost: It doesn’t require additional cost on hardware and shared storage than deploying failover cluster.
- High stability: It has been rigorously tested and has high stability. And backup process is more stable.
Please hit the button below to download and use AOMEI Cyber Backup for free:
*You can choose to install this VM backup software on either Windows or Linux system.
How to perform a secure & free backup in Hyper-V
In order to protect data and avoid financial damage, backup is necessary. This part introduces the detailed steps to perform an efficient backup using AOMEI Cyber Backup as an example.
1. Access to AOMEI Cyber Backup, then go to add Hyper-V device.
2. Click Task >> Backup Task >> Create New Task to start scheduling task.
● Select the host and virtual machines you want to back up, then click OK. It is allowed to select multiple VMs at the same time, which simplify the backup operations.
● Specify a local path or network path as backup location
● Schedule VM backup method (full / incremental backup) and type (hourly / daily / weekly / monthly). It will run the task automatically and regularly.
● Click Start Backup.
3. Restore: You can easily restore a VM from backup version when an error occurs in your original VM.
With perfect backup tasks, it helps to protect multiple Hyper-V VMs automatically and securely, and it’s easy for you to manage virtual machines centrally.
Hyper-V clustering is a complex and efficient technology to protect virtual machines’ safety with highly availability. In this article, I have introduced what is Hyper-V clustering and how to set up Hyper-V failover clustering in details.
If you are in a VMware environment, you can create vSphere High Availability cluster to perform VM failover.