We previously looked at how to configure Hyper-V Replica on non-clustered hosts. You can configure replication between non-clustered hosts and host clusters (in either direction), and between two different host clusters. The process of configuring VM replication does not change. However, you must prepare the clusters for Hyper-V Replica by enabling and configuring a role in the failover cluster known as the Hyper-V Replica Broker.
With non-clustered hosts we did the following:
Imagine that you wanted to replicate VMs from one 8-node cluster to another 8-node cluster, or maybe we could push Windows Server to the extreme and replicate from a 64-node cluster to another 64-node cluster. Do you really want to configure all those hosts, one at a time, and configure 1-1 replication between nodes, thus preventing the mobility that is inherent within a failover cluster?
Failover clustering gives us a role called the Hyper-V Replica Broker. The role of the broker is:
There is an additional use of the Hyper-V Replica Broker; you normally should configure inbound replication from the secondary site to the primary site. This allows you to reverse replication, which is required for a planned failover.
You should add the Hyper-V Replica Broker role to any host cluster (primary or secondary site) that will be involved in Hyper-V Replica. You do this by:
Adding the Hyper-V Replica Broker.
Note that the computer name that you enter in this wizard will be the name used for Hyper-V Replica:
You will probably want to make reverse replication from the secondary site to the primary site possible. To do this, do the following:
If reverse replication is not required then you’ve already done everything you need when creating the broker – you specified a computer name and IP address.
You will configure replication settings on the secondary site broker instead of configuring Hyper-V Settings on each host:
The below example is configured to accept replication over HTTP (Kerberos authentication). A cluster with a Hyper-V Replica broker called demo-hvc1-brkr will be allowed to replicate to this cluster and its virtual machines will be stored in a sub-folder called Demo-HVC1 in the Cluster Shared Volume called CSV1.
A configured secondary site Hyper-V Replica Broker.
You have quite a bit of firewall engineering to do to enable inbound replication from the primary site hosts to the secondary site hosts. You need to configure any firewall appliances and the Windows Firewall to allow the replication traffic. If you have a lot of hosts you can save some time by configuring Windows Firewall with some remotely executed PowerShell. The following example authorizes DemoAdministrator to configure the Windows Firewall on Demo-Host3 and Demo-Host4 for replication over the HTTP protocol:
Invoke-Command -ComputerName Demo-Host3,Demo-Host4 -ScriptBlock { Enable-NetFirewallRule -DisplayName “Hyper-V Replica HTTP Listener (TCP-In)” } -Credential “DemoAdministrator”
When you have a Hyper-V cluster then you should do all of your VM administration in Failover Cluster Manager. This includes enabling per-VM replication.
The below example shows a VM being replicated to a cluster with a Hyper-V Replica broker called Demo-FSC1-Brkr.demo.internal.
Replicating a Linux VM to a Hyper-V Cluster in the secondary site.