Hyper-V replication automatic failover and load balancing of VMs (no shared disk)

Hyper-V: The Simplest High Availability Cluster with Synchronous Replication and Failover

Evidian SafeKit brings high availability to Hyper-V. This article explains how to implement quickly a Hyper-V cluster without shared disk and without specific skills. The high availabity module hyperv.safe and a free trial are offered in the installation instructions section.

This clustering solution is recognized as the simplest to implement by our customers and partners. This solution solves only problems of hardware failures (20% of problems) including the complete failure of a computer room. If you want a complete solution that solves hardware failures (20% of problems), software failures (40% of problems) including smooth upgrade server by server and human errors (40% of problems) thanks to its simplicity, look at high availability at the application level and read this article VM HA vs Application HA.

How to implement Hyper-V replication automatic failover and load balancing of VMs with the SafeKit software (no shared disk)?

Principle

The replication of VMs is synchronous and real-time between two Hyper-V servers. Only modifications made inside files making up a virtual machine are replicated. Note that SafeKit implements synchronous real-time replication and not the traditional Hyper-V asynchronous replication. This feature is important because with an asynchronous replication, there is data loss on a failover  as explained in this article: synchronous replication vs asynhronous replication.

When the Hyper-V server fails, there is an automatic failover of the VM on the other Hyper-V server. And when the failed server is restarted, there is an automatic reintegration of VM files without stopping the VM on the other active Hyper-V server.

Each VM is replicated and automatically restarted independently. Some VMs can run on the first Hyper-V server and are replicated and restarted on the second Hyper-V server. Other VMs can run on the second Hyper-V server and are replicated and restarted on the first Hyper-V server. The load balancing of VMs between the two servers are controlled by the administrator through the SafeKit web console. By clicking on a swap button, the administrator can move a VM from one Hyper-V server to the other.

The solution requires no shared disk and no special Windows configuration. Only 2 Windows servers are necessary. The SafeKit software is installed on both of them.

Features

Hyper-V replication automatic failover and load balancing of VMs with SafeKit

Note that this solution is limited to replication and failover of 25 VMs.

Video demonstrating Hyper-V replication automatic failover and load balancing of VMs

In 10 minutes, the video shows all the steps to implement replication automatic failover and load balancing of VMs with SafeKit:

Note that SafeKit makes also Hyper-V replication and automatic failover of VM checkpoint and settings.

FAQ on Evidian SafeKit

Best use cases [+]

Customers [+]

Application high availability modules [+]

SafeKit Webinar [+]

Pricing - Free trial [+]

Comparison with other solutions [+]

Demonstration of a mirror cluster [+]

What are the advantages of the mirror cluster [+]

What is the recovery time (RTO) in a mirror cluster [+]

What is the data loss (RPO) in a mirror cluster [+]

Installation of SafeKit for Hyper-V high availability with synchronous replication and failover

Package installation on Windows

On both Windows servers

Configuration instructions

The Hyper-V configuration is presented with a virtual machine named VM1. You will have to repeat this configuration for all VMs that you want to replicate. SafeKit supports up to 25 virtual machines.

Important: all the configuration is made from a single browser.

Launch the web console in a browser by connecting to http://localhost:9010 (next image)

Start the SafeKit web console for configuring the Hyper-V module

Enter IP address of the first node and click on Confirm (next image)

SafeKit web console - first node in the Hyper-V cluster

Click on New node and enter IP address of the second node (next image)

SafeKit web console - second node in the Hyper-V cluster

Click on the red floppy disk to save the configuration (previous image)

In the Configuration tab, click on hyperv.safe then enter VM1 as the module name and Confirm: next images with hyperv.safe instead of xxx.safe (first image) and VM1 as module name instead of xxx (next images)

SafeKit web console - start configuration of Hyper-V module SafeKit web console - enter Hyper-V module name

Click on Validate (next image)

SafeKit web console - enter Hyper-V module nodes

Before the SafeKit configuration, you have to make a configuration in Hyper-V manager (see demonstration):

Then in SafeKit configuration (next image), give the path of the replicated directory (D:\Repli-Hyper-V in next image) where the VM has been exported and enter the exported VM name (VM1 in next image).

SafeKit web console - enter Hyper-V parameters

Click on Validate (previous image)

SafeKit web console - stop the Hyper-V module before configuration the configuration

Click on Configure (previous image)

SafeKit web console - check the success green message of the Hyper-V configuration

Check the success green message on both servers and click on Next (previous image).

SafeKit web console - select the Hyper-V node with the up-to-date database

Select the node with the most up-to-date replicated directories and click on start it to make the first resynchronization in the right direction (previous image). Before this operation, we suggest you to make a copy of replicated directories before starting the cluster to avoid any errors.

SafeKit web console - the first Hyper-V node starts as primary and is alone

Start the second node (previous image) which becomes SECOND green (next image) after resynchronisation of all replicated directories (binary copy from node 1 to node 2).

SafeKit web console - the second Hyper-V node starts as SECOND

The replication and failover is operational for VM1. VM1 is running on the PRIM node (previous image). Only modifications inside the Hyper-V files defining VM1 are replicated in real-time in this state.

Tests

Check with Hyper-V manager that VM1 is started on the primary server and stopped on the secondary server.

Stop the PRIM node by scrolling down the menu of the primary node and by clicking on Stop. Check that there is a failover on the SECOND node. And check the failover of VM1 with Hyper-V manager.

To understand what happens in the cluster, check the SafeKit logs of the primary server and the secondary server.

To see the module log of the primary server (next image):

SafeKit web console - Module Log of the PRIM Hyper-V server

To see the application log of the primary server (next image):

SafeKit web console - Application Log of the PRIM Hyper-V server

To see the logs of the secondary server (previous image), click on W12R2server75/SECOND (it will become blue) on the left side and repeat the same operations. In the secondary module log, you will find the volume and the reintegration time of replicated data.

Advanced configuration

In Advanced Configuration tab, you can edit internal files of the module: bin/start_prim and bin/stop_prim and conf/userconfig.xml (next image on the left side). If you make change in the internal files here, you must apply the new configuration by a right click on the blue icon/xxx on the left side (next image): the interface will allow you to redeploy the modified files on both servers.

Configure boot start (next image on the right side) configures the automatic boot of the module when the server boots. Do this configuration on both servers once the high availability solution is correctly running.

SafeKit web console - Automatic boot of Hyper-V module

Support

For getting support on the call desk of https://support.evidian.com, get 2 Snaphots (2 .zip files), one for each server and upload them in the call desk tool (next image).

SafeKit web console - Hyper-V snaphots for support
contact
CONTACT
Demonstration

Evidian SafeKit Pricing





White Papers

NEWS

To receive Evidian news, please fill the following form.