I am having to re certify my MCSE Server Infrastructure in the next
couple of weeks so I really need to skill up on Hyper-V and understand what it
can do in 2012 R2. I tend to always favour VMware in production deployments.
Overview of Hyper-V Replica on Windows Server 2012 R2
Hyper-V Replica is a technology that allows virtual machines (VM’s) to
be asynchronously replicated between Hyper-V hosts. Hyper-V Replica was
introduced in Windows Server 2012.
Hyper-V Replica Key Points;
- · Asynchronous replication between Hyper-V hosts.
- · Supported in Windows Server 2012 and above.
- · Replication is achieved over ordinary IP-based networks.
- · Hosts can be geographically separated.
- · Supported along side Hyper-V clustering and without.
- · No shared storage is required for Hyper-V Replica.
- · Hyper-V hosts do not have to be domain joined.
- · Hyper-V hosts can be domain joined, and reside in different forests.
- · Authentication between hosts can be done with certificates and Kerberos.
- · Hyper-V Replica can be used in conjunction with Azure ASR.
- · Replication cycles can be configured at 30s, 5mins or 15mins.
- · Hyper-V Replica traffic can be tagged using Trusted Groups for multi-tenant environments.
Hyper-V Replica seems to be aimed at the
Disaster Recovery space for failover at site level to a DR DC. Although in some
smaller organizations it can be used as failover between two Hyper-V hosts,
when expensive SAN’s etc. are not available.
However, if you plan to use Hyper-V Replica as
“cheap” failover, please bare in mind it’s not automatic. A manual step is
required in order to cutover to the replica host. You can however perform test
failover scenario’s so that you can effectively test your DR solution.
A log file is maintained by the Hyper-V Replica
service to ensure the last changes are played back to the replica VM’s, this is
done based on the replication cycle time you configure.
Configuring Hyper-V Replica on Windows Server
2012 R2
From the source Hyper-V host click Enable Replication from the Actions menu. Click Next on the introduction page.
Click Browse
and find the destination Hyper-V host you are going to enable replication
to. Click Next.
If you have not configured Hyper-V replica on the destination server you
will receive the error “The specified
Replica server is not configured to receive replication from this server.” the
option to Configure Server… will
appear.
This will display the Hyper-V Settings for the destination host. Click Enable this computer as a Replica Server. and
then tick Use Kerberos (HTTP), I am
going to cover the integration of certificates in a separate post.
Scroll down the windows and click Allow
replication from the specified servers and click Add, from here enter the name of the source Hyper-V host. You will
also be prompted to create a new Trust Group. A Trust Group is a form of Authorization
which contains servers that are allowed to replicate between each other.
As Kerberos is using TCP port 80 you must ensure that there is an
incoming rule, bound to the domain profile for the source/destination servers.
One important thing to remember on the Replication VHD’s page, is that
if you have Hyper-V Replica configured on a VM and you add additional disks to
it at a later stage Hyper-V does not detect this can it will not automatically
start replicating the new disks. You must reconfigure the replication to
include the new disks.
The frequency you select will depend upon your RPO/RTO requirements. In
most cases 30 seconds maybe a little excessive, as it will generate a very high
amount of network traffic. By default, replication traffic is sent over the
management interface.
Hyper-V Replica can be configured to store multiple recovery points;
this allows you to store multiple versions of the server for more options to
roll back.
Initial Replication can be configured, it’s worth knowing that if you
have a large amount of VM’s with large data sets you can stage the data onto an
external disk.
You can monitor the initial replication status of the VM.
Once it’s completed you can view the status of the replication from the
destination server, under the Replication
tab.
Replication health can also be checked from the source server if you
right click the VM and select Replication
> Replication Health.
You can perform planned failovers to the replica VM if you require, for
example you may have to take the source Hyper-V host offline for patching.
Please note that your failover will not work if you do not have the Virtual
Networks configured correctly on both side. You must have a Hyper-V Switch
configured on both Hyper-V hosts with EXACTLY
the same name, from a networking perspective this switch must be uplinked to
the correct physical network segment to allow the VM to continue working
properly.
A VM must be powered off to perform a planned failover, once it’s off
you should be able to failover the VM instance.