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

Hyper-V cluster 2012 R2 installation instructions

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

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_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"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

Install and configure SafeKit free trial

At this step, 2 VMs SERVER1 and SERVER2 are supposed to be created according the previous procedures.

Follow the instructions here to install SafeKit and the module on SERVER1 and SERVER2.

Do not forget to 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:

Other examples of Windows and Linux high availability modules

Mirror modules



Microsoft SQL ServerWindows module-
OracleWindows moduleLinux module
MySQLWindows moduleLinux module
PostgreSQLWindows moduleLinux module
FirebirdWindows moduleLinux module
Hyper-VWindows module-
Milestone XProtect (based on Microsoft SQL Server)Windows module-
Hanwha SSM (based on PostgreSQL)Windows module-
Generic moduleWindows moduleLinux module

Farm modules



IIS moduleWindows module-
Apache moduleWindows moduleLinux module
Generic moduleWindows moduleLinux module

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


Evidian SafeKit Pricing

White Papers


To receive Evidian news, please fill the following form.