Sunday, September 8, 2013

Hyper-V Replica

With Windows Server 2012, Microsoft has introduced a great new feature in the ever growing Hyper-V environment.  Hyper-V replica is a game changer in terms of providing a built in replication technology that is included even in the standard edition of Windows 2012.

I have had a chance to do some testing with this new feature and have been quite impressed with the operation.  In my test environment I used to machines with local storage.  I was able to create a VM on the primary Hyper-V machine and establish a replication link to my replica server.  After configuring the VM for replication, the VM was configured as a replica on the replica server and a file copy began.  You can monitor statistics of the replication through the Hyper-V manager interface.  Replication is setup to be asynchronous.  At this time you are limited to a replication of changes every 5 minutes and an application consistent backup at often as every hour through VSS.  This option will ensure the application is backed up in a consistent state that will allow the VM to be spun up from that point in time.  The disadvantage to this is that you may be subject to data lose based on this schedule.

From my testing I was able to get my replica up to date and perform a failover to the replica VM.  You have two options for the failover, a planned failover and an unplanned failover.  The planned failover will ensure consistent date by requiring the primary VM to be turned off.  Once any current replication is complete planned failover will bring the replica VM online and it will act in the capacity of primary VM.  As part of the process reverse replication is established to allow you failback without data loss.  The second option is an unplanned failover.  This failover will allow you to initiate a failover from the replica VM.  If you have enabled recovery point history you can choose which recovery point you would like to recover to.  This can be useful in situations where you have data corruption on your primary VM.  Once the failover is complete the replica VM will act as the primary.  In this case reverse replication must be manually started when the primary site is available.  This will allow you to perform a planned failover back to your primary site when the VMs are back in sync.

My testing has made it clear to me some huge advantages of this new feature.  In my environment I am running my primary VMs on an EMC SAN.  Microsoft has made it possible to perform a replication to a local disk.  This gives you a great deal of flexibility at your DR site.  Windows Server 2012 R2 is making some improvements to Hyper-V replica in terms of more granular replication times and multi site replication.  I hope to explore these features soon and report back with some of my findings.