Hyper-V Disaster Recovery
From my previous articles of Microsoft Hyper-V, I have discussed about the Overview of Hyper-V and the Hyper-V Operations. This article I’m going to address the Hyper-V Virtual machine high availability with Hyper-V Replications. When comes to Hyper-V High Availability there are options to select Fail over clustering or Load balancing clustering. These are host clusters which will provide high availability to their residing VM's. But it’s technically complex when implementing also there are licensing considerations and hardware costs involved. So it can be challenging to smaller organizations.
Hyper-V Replication
In Windows server 2012 R2 introduce Hyper-V Replication which is a built in feature to replicate VM's from its residing Host server to another Host Server. It is not a substitute for Failover clustering, it can use to protect VM's while asynchronously replicating a Virtual machine in a primary site to a replica Virtual machine in secondary site. Hyper-V replication does not require additional hardware or licenses, it can be activated easily by using the existing DR site and the existing network can be used for the replication.
Advantages
To implement Hyper-V replication, your primary site server which is the source site and the replica site server which is the DR site should be Windows Server 2012R2. And both sites should be allowed for replication from the firewall.
Enabling Hyper-V Replication
Before implementing Hyper-Replica, Hyper-V Replication should be enabled in the replica site server to accept replication from the Primary site host server. And if you want to have reverse replication after a fail over, you have to enable the replication in the primary site server as well.Microsoft always recommend to allow replication from both sites.
Configuring Virtual Machine Replication
After both sites are enabled for replication, you have to select the VM to replicate to the replica site. Initial replication will copy the VHD to the replica site and this can be done through the network or using an external media. If you are doing this using the network, select an off peak time so bandwidth impact will be lesser.
Testing the Failover
After the replication, you can confirm the replicated VM is running fine by doing Test Failover. Test failover can be run at any time, it will not have any impact to the production environment. By running the test failover, it will create a temporary Virtual Machine in the replica site host server. You can turn on this VM and see everything is functioning, this will not going interrupt the current replication. When you finish with the test failover, temporary VM will be deleted automatically.
Running a Planned Failover
In an event of a planned maintenance or a failure of the primary site or to test the disaster recovery site readiness, you can perform a planned failover. In a planned failover, the latest changes will be replicated to the replica site VM. And then it will started without a data loss.
Conclusion
Hyper-V Replication is not a substitute for failover clustering. It’s VM level DR scenario which does not require additional hardware or licenses. For better use of Hyper-V replication both Host servers should be Windows Server 2012R2, Firewall exception should be added, both hosts should be resolve each others FQDN and both host server replication should be enabled from Hyper-V console.
Cheers
Asitha De Silva