Windows Server 2012 Hyper-V – Part 4: Replication

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

Aaron Denton By Aaron Denton - Tue, July 24, 2012 - 1 comments

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.

Articles in this series

Windows Server 2012 Hyper-V

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.

Series NavigationWindows Server 2012 Hyper-V – Part 3: Storage Migration -

-1+1 - Rate this post
Loading ... Loading ...
Disclaimer
Your question wasn't answered? Please ask in the new 4sysops forum!

One Comment- Leave a Reply

  1. Aaron says:

    Great article on the Microsoft Virtualization blog about running Test Failover (TFO) on VMs that are doing replication. http://blogs.technet.com/b/virtualization/archive/2012/07/26/types-of-failover-operations-in-hyper-v-replica.aspx

Please share your thoughts in a comment!

Login

Lost your password?