Enabling Hyper-v Replica on Windows Server 2016

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 :

  1. enable-netfirewallrule -displayname “hyper-v replica http listener (tcp-in)”
  2. 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

2018-01-13 19_59_17-W2016DC1 on 2016CORE - Virtual Machine Connection.png

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 :

2018-01-13 20_14_38-W2016DC2 on 2016CORE - Virtual Machine Connection.png

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”2018-01-13 20_15_57-W2016DC1 on 2016CORE - Virtual Machine Connection.png

2018-01-13 20_07_42-W2016DC1 on 2016CORE - Virtual Machine Connection.png

Here we will specify the secondary server ( This case W2016DC2 )

2018-01-13 20_17_10-W2016DC1 on 2016CORE - Virtual Machine Connection.png

Personalize your replication options & methods if required.

 

2018-01-13 20_18_21-W2016DC1 on 2016CORE - Virtual Machine Connection.png2018-01-13 20_20_19-W2016DC1 on 2016CORE - Virtual Machine Connection.png2018-01-13 20_18_49-W2016DC1 on 2016CORE - Virtual Machine Connection.png

Now we are able to see the required replica of the other server:

2018-01-13 20_21_19-W2016DC2 on 2016CORE - Virtual Machine Connection.png

 

We can now see new brand options on the “replication menu”

2018-01-13 20_27_37-W2016DC1 on 2016CORE - Virtual Machine Connection.png2018-01-13 20_27_23-W2016DC1 on 2016CORE - Virtual Machine Connection.png

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s