In the last post of this Windows Server 2012 Hyper-V series I discuss virtual machine replication.
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
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.
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.
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.
Enabling replication and selecting which disks to replicate
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.