Introduction to Hyper-V Replica
The news over the past few years has been filled with natural disasters, such as
Hurricane Sandy, which have caused a loss of life and huge damage to the
infrastructure of entire cities. Even if the possibility of this type of disaster is
recognized weeks in advance, many organizations lack the technologies to enable
disaster recovery to alternate locations. In the previous section, I talked about SAN-
level replication, which is expensive and has requirements that are not available to
many organizations. Some applications such as SQL, Exchange, and Active Directory
have their own replication technologies to enable disaster-recovery protection, but
many other applications do not have any kind of replication capability. As more and
more of the datacenter is using virtualization, organizations are looking for a solution
at the virtualization layer to help in disaster-recovery planning.
Windows Server 2012 was an enormous release, particularly with regard to
virtualization and enabling cloud services. One of the biggest new features was the
introduction of Hyper-V Replica. Hyper-V Replica introduces the ability to replicate a
virtual machine asynchronously to a second Hyper-V host. The target Hyper-V server,
the replica, does not have to be part of a cluster with the primary Hyper-V host (in
fact, the replica cannot be in the same cluster as the primary), does not need any
shared storage, and does not even require dedicated network infrastructure for the
replication. The goal of Hyper-V Replica is to enable disaster-recovery capabilities for
any Hyper-V environment without steep requirements, and this is achieved through
its use of asynchronous replication.
Hyper-V Replica uses asynchronous replication efficiently and at a high level works as
follows:
1 . When a virtual machine is enabled for replication, a new virtual machine is created
on the Hyper-V replica host that matches the configuration of the primary virtual
machine, and the replica virtual machine is turned off.
2 . The storage of the primary virtual machine is replicated to the replica virtual
machine, and a log is started on the primary virtual machine for the VHDs being
replicated that stores the writes to the VHDs. The log file is stored in the same
location as the source VHD.
3 . Once the initial replication of the storage is complete, the log file is closed. A new
log file is started to track ongoing changes, and the closed log file is sent to the
replica Hyper-V host and merged with the VHDs for the replica VM. The replica
VM remains turned off.
4 . At a defined time interval, the log file is closed, a new one is created, and the closed
log file is sent to the replica and merged.
Note that the only replication is of the virtual hard disks of the virtual machine, not
the ongoing configuration of the virtual machine and not the memory. This is why you