In the last post of this Windows Server 2012 Hyper-V series I discuss virtual machine replication.

Aaron Denton

Aaron Denton has been working in IT for 10 years.He is a CCNP, MCITP, Enterprise Admin and Enterprise Messaging Administrator on Exchange 2007. Follow his blog itprostuff.

In the last article, part 3, I covered Windows Server 2012 Hyper-V Storage Migration and the improved high availability that it offers. Server 2012 also introduces, new for Windows Hyper-V, the ability to replicate virtual machines cluster to cluster, host to cluster, cluster to host, or host to host. In other words, Hyper-V Replica works in clustered and non-clustered environments. For the small and medium businesses (SMB), this is a great new add that assists in disaster recovery.

The way it works is fairly simple. The server hosting the replicating VM keeps track of changes to the virtual hard disks in a log file. Approximately every five minutes, that log file is shipped to the replicated destination and the changes are made to the copy of the VM at the DR location (see Windows Server 2012 Hyper-V Replica…In Detail).

Setting up Hyper-V Replica is nearly identical regardless of whether or not clustering is involved. The only difference is that a clustered VM requires the use of the Hyper-V Replica Broker cluster role. Setup between non-clustered hosts when both members are part of the same forest requires virtually no planning. This is because Kerberos authentication can be used and certificates are not required. If you will be replicating to another forest or to a host that is not a member of your domain, then the use of certificates is required.

Let’s look at a couple different scenarios.

Non-clustered Within the Same AD Domain ^

Windows Server 2012 Hyper-V Replication - Modify Authorization EntryWindows Server 2012 Hyper-V Replication - Inbound traffic needs to be allowed in the firewall

Adding an authorization entry and the prompt to enable Firewall rule

In this case, Host2 will replicate to Host1. From Hyper-V Manager, we start by opening the Hyper-V settings for Host1. A simple checkbox allows us to enable replication and begin configuration. Since both source and destination are in the same forest and domain, Kerberos (HTTP) can be used. You have the option to allow all incoming replication, or click Allow replication from the specified servers. The first option allows you to choose a storage location common to all replicated files. The second option would allow you to choose a different location and group name for each server.

After clicking okay, you will be prompted to enable the rule allowing port 80 traffic to the Hyper-V Replica HTTP Listener.

Windows Server 2012 Hyper-V Replication - Specify Replica ServerWindows Server 2012 Hyper-V Replication - Replication Health

Choose replica server and viewing replication health

Back at Host2, right-click a VM in Hyper-V Manager and select Enable Replication. The wizard will ask you to choose the replica server and then authentication method. Once configured, you can right-click a VM and select View Replication Health to monitor activity.

Clustered to DR Host outside of cluster domain ^

As mentioned before, clustered VMs require the use of the Hyper-V Replica Broker cluster role. If you attempt to enable replication on a VM, the wizard will not complete and notifies you that you must have a broker for your cluster.

Windows Server 2012 Hyper-V Replication - Hyper-V Replica Broker Configuration

Hyper-V Replica Broker Configuration

Creating the Hyper-V Replica Broker is done by right-clicking Roles in Failover Cluster Manager and clicking Add Role. Select the Hyper-V Replica Broker role and complete the wizard. Storage locations must be either a clustered volume, or share location.

Certificates must be in place prior setting up a VM for replication outside the domain. The certificate can be from your certificate infrastructure, a third party vendor, or self signed (see Step 1: Prepare to Deploy Hyper-V Replica).

From this point, enabling replication for the VM is the same for clustered and non-clustered hosts. The only difference is that you will enable certificate based authentication.

Windows Server 2012 Hyper-V Replication - Specify Replica Server 2Windows Server 2012 Hyper-V Replication - Choose Replication VHDs

Enabling replication and selecting which disks to replicate

Windows Server 2012 Hyper-V Replication - Configure Recover HistoryWindows Server 2012 Hyper-V Replication - Choose Initial Replication Method

Specify the number of recovery points and choose how to create the initial replica

As you can see, Hyper-V Replica is a fairly easy feature to setup and utilize.

This article concludes the series on new features in Windows Server 2012 Hyper-V.

Win the monthly 4sysops member prize for IT pros


1 Comment
  1. Author
    Aaron 5 years ago

    Great article on the Microsoft Virtualization blog about running Test Failover (TFO) on VMs that are doing replication.


Leave a reply

Your email address will not be published. Required fields are marked *



Please ask IT administration questions in the forum. Any other messages are welcome.

© 4sysops 2006 - 2017

Log in with your credentials


Forgot your details?

Create Account