Step-by-step implementation of a Hyper-V cluster 2012 r2 with replication, automatic failover and load balancing

How Evidian SafeKit implements simply a Hyper-V cluster 2012 R2 with replication, automatic failover and load balancing of VMs?

The goal of this article is to explain how to implement a Hyper-V cluster 2012 R2 in two VMware VMs. After the implementation, you will be able to run the following video with real-time replication, automatic failover and load balancing of VMs.
For more information on the architecture, see Hyper-V replication automatic failover and load balancing of VMs (no shared disk).


We suppose a laptop with the following minimum hardware and the installation with VMware Player of 2 Windows 2012 R2 VMs  as explained here.

Hyper-V cluster 2012 R2 configuration

The names of the 2 Windows 2012 R2 VMs are SERVER1 and SERVER2.

Note: To install the Hyper-V role inside a Windows 2012 R2 VM, a special configuration is required in VMware Player to run Hyper-V in a VM.
Else the following error is displayed: "Hyper-V cannot be installed: A hypervisor is already running."
To allow nesting of hypervisors (

Install the Hyper-V role in SERVER1 and SERVER2

For ease of demonstration, pin Hyper-V Manager in the Taskbar

Create a VM named Alpha in SERVER1

Customize Alpha:

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]
"AutoAdminLogon"=dword 32:00000001

Create a Beta VM as a clone Alpha in SERVER1:

Customize Beta:

In SERVER1, start File Exporer from the taskbar and create the folder C:HAVMs

Download and install SafeKit (at least in SERVER1 and SERVER2:

Add firewall rules in the Microsoft firewall ruleset to allow the SafeKit processes to communicate with their peers in the cluster. Start a command line as Administrator :

At this step, you can run the previous video and demonstrate a Hyper-V cluster 2012 R2 with replication, failover and load balancing of VMs. Before read the following notes.

Note 1: When exporting Alpha and Beta VMs to C:HAVMs, wait until the end of export before being able to delete Alpha and Beta.
You will see the percentage of Exporting in the Status column of Hyper-V Manager (resize if necessary).

Note 2: Instead of installing Remote Desktop Services, use in Hyper-V Manager the ability to connect to the display of Alpha and Beta.
Then, you will see the automatic restart of VMs after a failover between SERVER1 and SERVER2.

Note 3 : When making a demonstration with a swap of Alpha and Beta, it is better to have a program running to observe the migration of Alpha and Beta VMs between SERVER1 and SERVER2.
A simple choice is

Note 4: If SERVER1 and SERVER1 are running Windows 8.1 instead of Windows 2012 R2, you have to activate Powershell for the restart scripts of SafeKit Hyper-V module. For that:

All tutorials on the SafeKit high availability and load balancing software are available here.


Livres blancs



Pour recevoir des informations d'Evidian, veuillez remplir le formulaire suivant.