No cloud solution would be workable without a viable disaster
recovery solution. Virtualized workloads owned by business units in
large enterprises or by customers of cloud hosting providers must be
backed up regularly to prevent loss of continuity should a disaster
occur on the provider’s infrastructure.
While many third-party backup
solutions can be used for backing up and recovering VMs running on
Hyper-V hosts, the Hyper-V Replica feature in Windows Server 2012
provides an in-box business continuity solution for cloud environments
that can efficiently, periodically, and asynchronously replicate VMs
over IP-based networks, including slow WAN links and across different
types of storage subsystems. The Hyper-V Replica feature does not
require any shared storage or expensive storage array hardware, so it
represents a low-cost solution for organizations looking to increase
the availability of their virtualized workloads and ensure that these
workloads can be recovered quickly in the event of a disaster.
Hyper-V, together with Failover Clustering, allows VMs to maintain
service availability by moving them between nodes within the
datacenter. By contrast, Hyper-V Replica allows VMs to maintain
availability across a datacenter where the node hosting the replica is
located at a physically separate site. Hyper-V Replica provides
host-based replication
that allows for failover to a secondary datacenter in the event of a
disaster. It’s an application-agnostic solution because it operates at
a VM level regardless of what guest operating system or applications
are installed in the VM. It’s a storage-agnostic solution because you
can use any combination of SAN, direct attached storage (DAS), or SMB
storage for storing your VMs. It also works in both clustered and
nonclustered environments, and you can even replicate from a host on a
shared cluster to a remote, stand-alone replica host. And it works with
Live Migration and Live Storage Migration.
Typical cases for using Hyper-V Replica might include:
-
Replicating VMs from head office to branch office or vice versa in large and mid-sized business environments
-
Replication between two datacenters owned by a hosting provider to provide disaster recovery services for customers
-
Replication from the premises of small and mid-sized businesses to their hosting provider’s datacenter
Implementing Hyper-V Replica
Hyper-V Replica
can be enabled, configured, and managed from either the GUI or by using
PowerShell. Let’s briefly look at how to enable replication of a VM by using Hyper-V
Manager. Begin by selecting the Replication Configuration section in
Hyper-V Settings on the hosts that you plan on replicating VMs to or
from. Select the Enable This Computer As A Replica Server check box to
enable the host as a replica server and configure the authentication,
authorization, and storage settings that control the replication
process:
Once you’ve performed this step on both the primary and replica
servers (the primary server hosts the virtualized production workloads,
whereas the replica server hosts the replica VMs for the primary
server), you then can enable replication on a per-VM basis. To do this,
right-click a VM in Hyper-V Manager and select Enable Replication, as
shown on the following page.
When the Enable Replication wizard launches, specify the name of the replica server that you want to replicate the selected production VM to:
Specify connection parameters that define the port and authentication method used for performing replication:
Continue through the wizard until you reach the Choose Initial Replication Method page, where you specify how and when the VM first will be copied over to the replica server:
Once you’ve completed the wizard and clicked Finish, replication will begin. You can view the replication process as it takes place by selecting the Replication tab in the bottom-central pane of Hyper-V Manager:
You also can use the Measure-VMReplication cmdlet in PowerShell to view the success or failure of the replication process:
To view all the PowerShell cmdlets for managing the Hyper-V Replica feature, use the Get-Command cmdlet, as shown here: