Hyper-V makes it easy to create standby copies of virtual machines, known as replicas, that reside on alternate Hyper-V hosts. The idea is that if something happens to one of your virtual machines or the host that it resides on, you can simply launch a replica of the virtual machine on another server and resume operations. As handy as Hyper-V replication might be, it is actually possible to perform three-way replication by creating both a primary replica and an extended replica. Typically, the primary replica would reside in your datacenter, while the extended replica would reside on another Hyper-V host in a remote location. This article will show you how to create both a primary and an extended replica of a Hyper-V virtual machine.
Creating extended Hyper-V replicas: Beginning the process
Begin the process by right-clicking on the virtual machine you want to replicate and choosing the Enable Replication option from the shortcut menu. This will cause Windows to launch the Enable Replication wizard. Click Next to bypass the wizard’s Welcome screen.
At this point, you will see a screen asking you to specify the name of the replica server. This is the server that you will be replicating the virtual machine to. Since we are setting up three-way replication, this will be the on-premises replica host.
Incidentally, if the specified host is not yet configured for replication, you will receive an error message. Just click the Configure Server button displayed alongside the error message and then select the Enable this Computer as a Replica Server checkbox. You will also need to pick an authentication protocol and specify the name of the server that you want to allow replication from.
Click Next, and you will be taken to a screen prompting you to choose the authentication type you want the replication process to use. There is also an option on this screen to compress the replication data sent across the network. Enabling this option saves network bandwidth, but consumes a bit of CPU resources.
Click Next, and you will be prompted to select the virtual hard disks you want to replicate. Typically, all of a virtual machine’s virtual hard disks should be replicated.
Click Next, and you will be prompted to specify the replication frequency. The default replication frequency is five minutes, but you can choose to replicate changes to the virtual machine as frequently as every 30 seconds or as infrequently as every 15 minutes.
Click Next, and you will see a screen asking you how many recovery points you want to maintain. Typically, only the most recent recovery point (which is required to be able to failover to the replica) is retained, but you can create hourly point-in-time recovery points spanning up to 24 hours. This allows you to revert the replica to a previous state should it become necessary to do so. There is also an option to create periodic VSS snapshots.
Click Next, and you will be prompted to choose the initial replication method. Normally, you will probably want to send the replica over the network and start the replication process immediately. However, there is an option to send the replica using removable media or to delay the initial replication process.
Click Next, and you will see a summary of the replication options that you have chosen. Assuming that all of these options look good, click the Finish button to begin the replication process. Keep in mind that depending on the size of the virtual machine, its rate of change, and the speed of your network, the initial replication process can take quite a while to complete.
Once the initial replication completes, you should see the replica VM appear within the Hyper-V Manager on the replica server. Now it’s time to extend the replication process to an offsite Hyper-V server. To do so, right-click on the replica VM (the copy on the replica server) and select the Replication | Extend Replication commands from the shortcut menus.
At this point, Hyper-V will launch the Extend Replication wizard. Click Next to bypass the wizard’s Welcome screen.
The wizard’s remaining steps are very similar to what you have gone through while creating the initial replica. First, you will need to enter the name of the server that will host your extended replica. From there, you will need to specify an authentication protocol, configure the replication frequency, choose whether you want to create any additional recovery points, and then specify your initial replication method. Upon doing so, Hyper-V should begin creating the extended replica.
Extended Hyper-V replicas offsite: Some considerations
Even though the process of setting up an extended replica is nearly identical to that of setting up the primary replica, there are a few things that you need to consider. First, even though extended replicas are designed to be hosted in a remote location, nothing is stopping you from creating an extended replica onsite.
If you choose to host an extended replica, offsite, you may need to think about using removable media to seed the replica. Depending on the virtual machine’s size and your available bandwidth, performing the initial replication process across the Internet might not be practical.
Another thing to consider is that if the replica is offsite, then you probably won’t be able to perform synchronizations as frequently as if the replica were sitting inside your own datacenter. Whereas 30-second synchronizations might be perfectly acceptable onsite, you will likely need to set the synchronization frequency to five minutes or even 15 minutes for offsite replicas.
Featured image: Shutterstock