Back in Windows 2012, Microsoft introduced a feature called Hyper-V Replica. This feature has been improved in the 2012R2 version and has even more improvements in Windows Server 2016 due for launch shortly. In this series on Windows Hyper-V Replica, I’ll aim to give you some background on the feature as well as pointers on how to implement it.
What is Hyper-V Replica?
Well basically, it’s a cheap way to offer the ability to replicate a working VM from one Hyper-V host to another, so as to provide the ability for fast failover in the event of a failure of either the VM or the Host itself. Hyper-V Replica is firstly configured on two host servers, and then you can individually select which Guest VMs to replicate. Not all VMs’ need to replicate to the destination host server. Microsoft have designed it to permit replication of VMs to both domain joined and non domain joined hosts, and with the use of SCVMM, you can even replica to Azure if you desire.
What happens when I configure a host as a Hyper-V replica host?
Configuring a host as a replica host simply gives it the ability to act as either a source or destination for VMs that are replicated. It places no additional load on a host if it’s not being used, and if the host is domain joined then it’s simply a matter of a few configuration options and you can be replicating your VMs to another host within the same domain.
What is the frequency of replication?
In Windows Server 2012, replication occurs every 5 or 15 minutes. In Windows Server 2012 R2, Microsoft enhanced the functionality to add a 30 second option, although you need to consider bandwidth usage when doing such high levels of replication.
How much data is replicated from host to host?
That’s the big question – the answer is that it depends on the amount of data changed on the guest VM. If it’s a simple file and print server, then there’s likely not a lot of data change, however if it’s a database server then things such as database reindexing and the like will increase the amount of data to be transferred to the remote host.
Will a failed VM automatically start on the destination host?
No – this is not an automatic feature. If you need features like this then you need to consider clustering. When a VM or source host fails, you will need to go to the destination host and execute a process to failover that VM to the remote host, and then start it. In this case, the VM will start as if it had an unscheduled power outage, and should recover fine, although this is dependent on the type of application being run on this server. Microsoft do not recommend Replica for use with Exchange servers, instead they recommend using DAGs within Exchange itself. Having said that, in my testing and use, I’ve had no issues in replicating single exchange servers from host to host.
Can I do a test failover?
Yes you can – the option is there to do a test failover, which will allow you to start the VM in an isolated environment. You can even connect the guest VM to a temporary test hyper-v network so as to verify communication with other VMs that are also in the test failover phase. At the end of the testing you can finish testing and execute another option that will cleanup any changes made, leaving the destination VM in it’s most current state as per the source VM (i.e. none of your changes from the test VM are written into the destination VM).
Are there limitations to Replica?
Yes – there are – aside from the aforementioned replication frequency, there is one other key limitation you need to be aware of. In 2012 and 2012R2, when you configure a VM to replicate, it will replicate all it’s hard drives to the destination by default. You cannot add a VHD to the source VM and later configure it to replicate also, as you need to tear down the replication of that VM and start again. In 2016 they’ve added the feature to allow you to add in a VHD after the fact and replicate it nicely.
Another limitation is that you can only replicate UPwards in terms of the OS. That is – you can replicate from a 2012 Host to a 2012 R2 Host, but not from a 2012R2 host to a 2012 host. You need to take this into consideration if you are considering using old licenses and the like to do this function.
In 2012, you can only replicate from a source host to a destination host. In 2012 R2, they provided the ability to extend replication from the destination host to a tertiary host
How much disk space will I need?
You will need the same amount of disk space on the destination as you do on the source host machine – ie a 500GB Fixed VHD will immediately create a 500GB VHD on the destination. If however the VHD is dynamic then it will only take the amount of space it does on the source right now. Hope that makes sense.
There’s lots more to talk about with Hyper-V replica, but these are some of the questions I’ve been asked more recently that I felt were not easily addressed elsewhere on the Internet. Let me know if you have any specific questions and I’ll address them in a future post.
Leave a Reply