March 30, 2023
Hyper-V Replica: Hyper V replica is virtual machine replication technology made for disaster recovery and business continuity. A virtual machine can be replicated from one location to another by using Hyper V and a network connection to it. This replica can work with any server network, storage or vendor.
Benefits of Hyper-V replica:
1. In the event of a failure at your primary sites like fire, power shortage, or server failure hyper V replica allows you to replicate server at a secondary location with a minimum downtime.
2. Depending upon the recovery history selections for the virtual machines Hyper-V provides an option to restore virtualized workloads at a point.
3. Hyper-V replica server and storage hardware’s configuration need not be identical at each site.
Hyper- V Replica requirements:
1. On the active directory server, both primary and secondary sites need to be under one domain.
2. Primary site and a Replica site are Windows Server 2012 R2 Hyper-V hosts where the former run production or the so-called primary VMs, while the latter hosts replicated ones which are off.
3. The locations hosting primary and Replica servers must have network connectivity.
4. There should be sufficient storage available on primary and replica servers to host the files.
Configuration Step 1 – Enable Hyper-V Replica
- For Enabling Hyper-V Replica go to Hyper-v settings in hyper V manager repeat the same on target replica to enable hyper-V under Replication Configuration click on “Enable this computer as a Replica Server.”
- Use Kerberos (HTTP) without encryption on 80 Port
- Under Authorization and Storage select option to “Allow replication from any authorized server”.
- Determine the default location to store replica File.
Replica sample settings of a primary site
Step 2 – Configure Hyper-V Replica on VMs
- Enable Hyper-V Replica of a VM by right-clicking the VM and selecting the option “Enable replication”
Step 3 – Carry out Initial Replication
Now in configuring Hyper-V Replica of a source VM there are options to deliver an initial replica.
1. Send Initial Copy Over Network: - If an initial replica is to be transmitted over the network, which can happen in real-time or according to a configured schedule.
2. Send Initial Copy using external Media: - While sending an initial copy on the wire may overwhelm the network, not be reliable, take too long to do it or not be a preferred option due to the sensitivity of content. So optionally an initial copy can also be delivered out of band, i.e. with external media.
3. Turn on the drives you want to replicate then Click Finish
Replication firewall rules: Configured Firewall rules in the proper manner will permit replication between the both primary and replica servers and sites. To permit any incoming VM replication traffic for configured replication ports, see to it that an inbound firewall rule is created.
- Click Control Panel > System and Security > Windows Firewall > Advanced Settings > Inbound Rules
- Hyper-V Replica HTTP Listener (TCP-In) – Right Click and Select Enable Rule (make sure the rule is enabled for the proper network).
- Hyper-V Replica HTTPS Listener (TCP-In) – Right Click and Select Enable Rule (make sure the rule is enabled for the proper network).