How Hyper-V High Availability Works
By: NAKIVO Team
Modern businesses need to ensure 24/7 availability of their services. If an organization experiences downtime, the consequences are often unpredictable. These might include, but are not limited to issues relating to workflow interruptions, loss of critical data and potential revenue, damaged business reputation, loss of customers to competitors, etc.
The best way to protect your Hyper-V virtual environment is to eliminate a single point of failure within the system. This process entails adding redundant hardware or software components that, in case of failure, could potentially render the entire system non-functional. For example, when a Hyper-V host fails, all virtual machines running on it fail as well, thus leading to the loss of the entire virtual infrastructure.
Microsoft strives to ensure high availability of business operations, and increase overall infrastructure resilience. For this purpose, Hyper-V High Availability has been introduced.
How Hyper-V High Availability Works
Failover clustering is the process of combining several independent computers (called nodes) into a single group that enables a high level of availability and scalability of applications and services. Clustered servers can be connected by physical cables as well as by software. If one of the clustered servers fails, other nodes can take on its workload and perform required services. This process is known as failover, which allows you to rapidly resume critical operations, reduce system downtime, and ensure business continuity even during a disaster.
To verify the state of Hyper-V failover clusters, each cluster node sends a heartbeat signal once per second. If the system doesn’t receive a heartbeat from a specific node within a 10-second period, then the node is assumed to have failed. In such case, another node assumes the workload of the failed node, and critical processes should be successfully restored.
One of the ways of ensuring Hyper-V High Availability is to place guest cluster nodes on different physical servers. Thus, if one of the physical hosts fails as well as its guest cluster node, another guest cluster node automatically detects the system failure, and starts running the clustered roles that were running on the failed node.
Moreover, with Hyper-V High Availability enabled, you can move clustered roles from one node to another without interrupting the application’s operation. This way, you can easily configure, troubleshoot, update, or restart a specific VM.
Hyper-V High Availability Requirements
Before you can enable Hyper-V High Availability and start enjoying its benefits, you need to verify that your hardware and software settings are compatible with the failover clustering technology.
Requirements for Hyper-V Failover Clustering include:
- At least two cluster nodes, where one is used for running a production workload while another one is used for failover.
- CPUs with support for hardware-assisted virtualization and hardware-based Data Execution Prevention (DEP). It is recommended that you use processors which belong to the same CPU family in order to minimize the risk of cluster failure and optimize the process of VM migration.
- Cluster nodes should be connected by multiple networks to avoid a single point of failure. Alternatively, your cluster nodes can be connected using one network which consists of multiple network adapters, switches, and routers. This way, you can ensure network redundancy in your infrastructure.
- Shared storage which can be accessed by all cluster nodes via iSCSI, fibre channel, or SMB 3.0 protocol. This way, multiple cluster nodes can have access to the same LUN at the same time and conduct read/write operations without interrupts.
- Cluster nodes should belong to the same Active Directory domain, which helps to ensure cluster resiliency and provide support for more deployments.
- Cluster nodes should run either Hyper-V Server, or Windows Server with the Hyper-V role enabled.
- You must be a local administrator on each of the servers that you want to include in the cluster, since an administrator is the only person who can make configuration changes in failover clusters.
Enabling Failover Clustering role on a Hyper-V host
After checking all requirements, you can now enable the Failover Clustering role on a Hyper-V host. For this purpose, take the following steps:
- Open the Server Manager.
- Select Add roles and features.
- Click Role-based or feature-based installation.
- Select a server or a virtual hard disk on which to install the Failover Clustering role.
- In the Features section, select Failover Clustering.
- In the Confirmation section, click Install.
- The installation operation should start automatically. In the Results section, you can see its progress and verify that the required components are installed.
After that, you are able to access the Failover Clustering feature. Using the Failover Cluster Manager, you can now create failover clusters, validate hardware compatibility, and configure existing failover clusters. To launch the wizard, open the Server Manager, select Tools, and click Failover Cluster Manager. The wizard should appear as follows:
When using the Failover Cluster Manager, you should first validate your hardware configuration, and only after that can you start creating a failover cluster to enable Hyper-V High Availability.
Note that if you would like to validate a set of unclustered servers, you need to know the names of those servers. On the other hand, if you wish to validate an existing failover cluster, you should know the name of the cluster or one of its nodes.
For a more comprehensive walkthrough, download our white paper on Hyper-V Failover Clustering, which discovers how Hyper-V Failover Clustering works, describes use cases for Hyper-V failover clusters, and explains in detail how to successfully deploy a failover cluster in a Hyper-V environment.
How to Create a Highly Available Hyper-V VM
In today’s blog post, I want to focus on how to make a Hyper-V VM in a failover cluster highly available. For this purpose, you first need to create and configure a Hyper-V failover cluster and validate the configuration in the Failover Cluster Manager. After that, your system is ready for enabling Hyper-V High Availability.
Thus, to make a Hyper-V VM highly available, you should do the following:
- Open the Failover Cluster Manager.
- In the left pane, right-click Roles, select Virtual Machines, and then go to New Virtual Machine.
- The New Virtual Machine window should open, where you can select the target cluster node on which the VM would run.
- The New Virtual Machine Wizard should open. Read the information in the Before You Begin
section. - In the Specify Name and Location section, enter the name of a new VM and select the folder for storing the VM.
- In the Specify Generation section, choose the generation of the new VM.
- In the Assign Memory section, you should specify the amount of startup memory which can be used by the new VM. Moreover, you can enable the use of Dynamic Memory for this VM.
- In the Configure Networking section, select the virtual switch which can be used by the network adapter.
- In the Connect Virtual Hard Disk section, specify on which virtual hard disk the VM should be stored. Here, you can create a virtual hard disk, use an existing virtual hard disk, or attach a virtual hard disk later.
- In the Installation Options section, select how you would like the OS to be installed on this VM.
- In the Summary section, read the description of the new VM and click Finish to create the new highly available VM.
As a result of such configurations, you should have the highly available Hyper-V VM, which can be easily failed over (live migrated) to another host if its original Hyper-V host fails.
How to Make an Existing Hyper-V VM Highly Available
You can make an existing Hyper-V VM highly available, provided it is connected to a shared storage. To this end, you need to take the following steps:
- Open the Failover Cluster Manager.
- In the left pane, right-click Roles and select Configure Role.
- The High Availability Wizard should open. Read information in the Before You Begin
- In the Select Role section, click Virtual Machine to enable Hyper-V High Availability for specific VMs.
- In the Select Virtual Machine section, choose the VMs which you want to make highly available.
- In the Confirmation section, you have to confirm that you want to enable Hyper-V High Availability for this specific VM.
- In the Configure High Availability section, you can see the progress of configuring Hyper-V High Availability.
- In the Summary section, you can see the results of this operation and verify that the selected Hyper-V VMs were made highly available. Click Finish.
By going through this configuration process, you can make your VMs fault-tolerant and, consequently, enable Hyper-V High Availability in your virtual environment. If server or component failures take place in your infrastructure, Hyper-V High Availability can help you to quickly recover, and minimize the impact of downtime and productivity loss.
Wrapping Up
High availability can be achieved by ensuring redundancy and fault tolerance. However, Hyper-V High Availability alone cannot guarantee constant data protection and uninterrupted business performance. For this purpose, you need to use a reliable data protection solution which can easily back up critical data and applications and rapidly recover the entire virtual infrastructure in case of a system failure.
NAKIVO Backup & Replication is a fast, effective, and reliable solution which allows you to protect Hyper-V, VMware, AWS EC2, Nutanix and Microsoft 365 environments with a single product. By installing NAKIVO Backup & Replication, you can get access to a rich feature set and multiple data protection options, which include backup, backup copy, backup to cloud, replication, and site recovery.