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.

Note that you can implement with the same product real-time replication and failover of other applications (database or other): see examples of mirror modules here.

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)?


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.


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.

Note also that SafeKit is able to automatically re-synchronize a failed Hyper-V server without any manual operation and without stopping the VMs. It is an important differentiator when comparing SafeKit to replication solutions whose failover only works once: reintegrating the failed server in the cluster requires complex and non-automated manual operations.

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.

Key differentiators of Hyper-V replication, load balancing and failover of VMs with Evidian SafeKit

SafeKit with the Hyper-V moduleMicrosoft Hyper-V Cluster & VMware HA
SafeKit with Hyper-V 2012 R2
No shared disk - synchronous real-time replication instead with no data lossShared disk and specific extenal bay of disk
Remote sites = no SAN for replicationRemote sites = replicated bays of disk across a SAN
No specific IT skill to configure the systemSpecific IT skills to configure the system
Limited number of VMs (25 VMs)Large number of VMs

VM HA with the SafeKit Hyper-V moduleApplication HA with SafeKit application modules
Application HA
Replicates too much data (App+OS)Replicates only application data
Reboot of VM on hypervisor 2 if hypervisor 1 crashes: unknown recovery time if the reboot requires manual operationQuick recovery time with restart of App on OS2 if crash of VM1
No application checker and software failoverApplication checker and software failover
Risk of downtime when fixing OS or App (single image)Smooth upgrade of OS1 or OS2 or App (two images)
Generic solution for any application / OSIntegration with high availability application modules

FAQ on Evidian SafeKit [+]


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 (xxx.safe in the next image) then enter VM1 as the module name and Confirm

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.


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 (next image), 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.

SafeKit web console - Advanced configuration of Hyper-V module

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


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