Setup Windows Server 2016 Hyper-V VM Replication

0

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.

repreceive01a Setup Windows Server 2016 Hyper-V VM 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.

hyperrep01a Setup Windows Server 2016 Hyper-V VM Replication

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.

hyperrep01 Setup Windows Server 2016 Hyper-V VM Replication

The High Availability Wizard begins.

hyperrep02 Setup Windows Server 2016 Hyper-V VM Replication

Next, we select the Hyper-V Replica Broker server.

hyperrep03 Setup Windows Server 2016 Hyper-V VM Replication

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.

hyperrep04 Setup Windows Server 2016 Hyper-V VM Replication

Once this is done, the computer object is added to Active Directory for the replica broker network name.

hyperrep05 Setup Windows Server 2016 Hyper-V VM Replication

We then finalize the configuration of the role.

hyperrep06 Setup Windows Server 2016 Hyper-V VM Replication

Now, we should have a Replica Broker name that we can use in the replication wizard.

Configuring VM Replication

 

repreceive01a-1 Setup Windows Server 2016 Hyper-V 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.

repreceive01 Setup Windows Server 2016 Hyper-V VM Replication

Check the Enable this cluster as a Replica server.

repreceive02 Setup Windows Server 2016 Hyper-V VM Replication

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.

repreceive03 Setup Windows Server 2016 Hyper-V VM Replication

We get a note about the Windows firewall that we need to configure the firewall to allow inbound traffic.

repreceive04 Setup Windows Server 2016 Hyper-V VM Replication

Now we are taken back to the specify replica server wizard.  Notice now we have no warnings/errors pointing to the replica broker name.

repreceive05 Setup Windows Server 2016 Hyper-V VM Replication

To align with our configuration of the broker server, we select Use Kerberos authentication (HTTP).

repreceive06 Setup Windows Server 2016 Hyper-V VM Replication

Next, we can select specific vhdx files for the virtual machine.  I only have one vhdx file so it is selected by default.

repreceive07 Setup Windows Server 2016 Hyper-V VM Replication

We can select the replication frequency on the next page.  We have the option of 30 seconds5 minutes, or 15 minutes.

repreceive08 Setup Windows Server 2016 Hyper-V VM Replication

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.

repreceive09 Setup Windows Server 2016 Hyper-V VM Replication

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.

repreceive10 Setup Windows Server 2016 Hyper-V VM Replication

Finally, we get to the summary screen showing our configuration choices.

repreceive11 Setup Windows Server 2016 Hyper-V VM Replication

Replication is enabled successfully.

repreceive12 Setup Windows Server 2016 Hyper-V VM Replication

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.

repreceive13 Setup Windows Server 2016 Hyper-V VM Replication

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.

repreceive14 Setup Windows Server 2016 Hyper-V VM Replication

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.