Scenario:
Implement high availability and disaster recovery options in hyper-v
Hyper-v Replica is a feature which allows the administrator to create replicas of the virtual machines locally o remotely. The process is asynchronous, and the failover process is not automatic.
Hyper-v replica is based on checkpoints meaning only the changes performed on the primary server are checkpointed and replicated.
Basic Pre-requisites :
- Hyper-v Role must be installed on both servers
- Servers must be located after the same firewall
- Not part of a cluster
- Domain Joined Servers with trust relationship
- Kerberos auth
Configuring the firewall ( both ways )
We shall configure both window’s firewalls, in order to do so, run the following commands in both replicas on a PowerShell console :
- enable-netfirewallrule -displayname “hyper-v replica http listener (tcp-in)”
- enable-netfirewallrule -displayname “hyper-v replica https listener (tcp-in)”
This configuration process is only required on the replica server, but you might want to consider configuring the primary server in the same way, in anticipation of a recovery from a failover situation.
Configuring the replica ( one direction )
We must configure the replication in one direction hence hyper-v. To do so we will perform this setup on the secondary server.
Select the following options
- Enable this computer as a Replica server
- Use Kerberos HTTP
- Allow replication from the specified servers ( will be DC2016 – Dc1) – Primary Server
On the Authorization and storage, we will instruct “allow replication from the specified servers, and add our primary server, in this case, DC2016.test.test
Also point out a replication group, in this case, we have called “Replica”.
note: Ensure to use the FQDN as displayed otherwise it will fail :
For now, we are done with the secondary server.Now let’s go to the primary server:
We can start the replica, right click on the VM hence “enable replication on the primary server”
Here we will specify the secondary server ( This case W2016DC2 )
Personalize your replication options & methods if required.
Now we are able to see the required replica of the other server:
We can now see new brand options on the “replication menu”