Setup Windows Server 2016 Hyper-V VM Replication
Setting up Hyper-V replication allows you to replicate a virtual machine from one Hyper-V environment over to another. ย The nice things about replication in the Microsoft Hyper-V hypervisor world is that there is no appliance to have to setup or other plugin you have to have to make this work. ย It is included in the box. ย Let’s take a look at how to setup Windows Server 2016 Hyper-V VM replication and the steps involved with getting this to work.
Setup Windows Server 2016 Hyper-V VM Replication
In order to begin setting up Windows Server 2016 Hyper-V Replication, simply right click on the virtual machine you wish to replicate and chooseย Enable Replication.
Theย Enable Replicationย wizard begins. ย A little background to my lab enviroment. ย I have a standalone Windows Server 2016 Hyper-V host running a couple of virtual machines that I want to replicate to aย Windows Server 2016 Hyper-V cluster. ย When you replicate to a cluster, you have to specify the name of theย Hyper-V Replica Broker server. ย This is a special role that you have to configure on your cluster server. ย So we need to do that first if replicating to a cluster. ย Notice the error we get pointing to the cluster without the replica broker role installed.
Setting up the Replica Broker
To setup the Replica Broker, we need to go to theย Failover Cluster Manager for the Windows Server 2016 Hyper-V cluster. ย Right-click your cluster and selectย Configure Role.
Theย High Availability Wizard begins.
Next, we select theย Hyper-V Replica Broker server.
Select a name for the Replica Broker. ย This will be a network name that is added to our cluster. ย You need to also define an unused IP address for the network name.
Once this is done, the computer object is added to Active Directory for the replica broker network name.
We then finalize the configuration of the role.
Now, we should have aย Replica Broker name that we can use in the replication wizard.
Configuring VM Replication
We receive another error of sorts in that we have not allowed the Replica server to receive the replication. ย We can click theย Configure Server… button which will launch the configuration of the receiving cluster for us.
Check theย Enable this cluster as a Replica server.
Also, we need to check theย Use Kerberos (HTTP) check box. ย Note, I am using this in a lab environment to quickly get replication up and going. ย However, for stronger security,ย use certificate-based authentication (HTTPS).
We also selectย Allow replication from any authenticated server for quick replication provisioning. ย For best security though, use theย Allow replication from the specified servers for granular control.
We get a note about the Windows firewall that we need toย configure the firewall to allow inbound traffic.
Now we are taken back to theย specify replica serverย wizard. ย Notice now we have no warnings/errors pointing to the replica broker name.
To align with our configuration of the broker server, we selectย Use Kerberos authentication (HTTP).
Next, we can select specificย vhdx files for the virtual machine. ย I only have one vhdx file so it is selected by default.
We can select the replication frequency on the next page. ย We have the option ofย 30 seconds,ย 5 minutes, orย 15 minutes.
You can choose toย maintain only the latest recovery point, orย create additional hourly recovery points and select a number of recovery points if we choose. ย There are other VSS options here we can select as well.
For theย initial replication Method we can choose toย seed the drive with external media which would be desirable over slow links, or we can choose toย send initial copy over the network if we are on the same LAN or have a network carved out for this. ย We can also choose to schedule the replication period or simply start it immediately.
Finally, we get to the summary screen showing our configuration choices.
Replication is enabled successfully.
Going back toย Hyper-V Manager of the standalone host we are replicatingย from we can see that aย checkpoint has been created and we see the status ofย Sending Initial Replication and the percentage of the transfer that has been completed.
On theย target side of the replication, in ourย Failover Cluster Manager we see theย Win10test VM that was replicated from our standalone host has been created.
Thoughts
Windows Server 2016 Hyper-V has taken Hyper-V to new heights with functionality and it is certainly a serious player in the virtualization space. ย Replication is one of the things that I really like compared with other hypervisors in that it is builtin the box – no appliances or other add-ons. ย So if you are looking toย Setup Windows Server 2016 Hyper-V VM Replication it is simply a matter of completing the wizards as we have looked at above.