Hyper-V

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.

repreceive01a

 

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

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

The High Availability Wizard begins.

hyperrep02

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

hyperrep03

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

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

hyperrep05

We then finalize the configuration of the role.

hyperrep06

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

Configuring VM Replication

 

repreceive01a-1

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

Check the Enable this cluster as a Replica server.

repreceive02

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

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

repreceive04

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

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

repreceive06

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

repreceive07

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

repreceive08

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

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

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

repreceive11

Replication is enabled successfully.

repreceive12

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

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

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.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.