Hyper-V Replica is a new feature in Server 2012 that allows for the asynchronous replication of VMs
(a fancy way of stating that you are replicating a VM from one host
machine to another), which is great for times when you are having issues
with a host.
Keep in mind that this isn’t migrating, because you aren’t moving
a VM from one Hyper-V server to another. Instead, you are making an
exact copy of a VM and placing it on another server. As with live
migration, the Hyper-V machines do not have to have shared storage or be
in a cluster. They just have to be able to communicate on a
network.
-
First, to create a VM replica, you have to enable replication.
From Hyper-V Server Manager, right-click the VM that’s to be
replicated and select Enable Replication. This opens up yet another
wizard. -
The next order of business is to specify the replica server.
In Figure 4, I have selected the
server that will receive the replicated VM; however, I get an error
that the specified replica server is not configured to receive
replication.
Hyper-V gives us the option to configure the replica server,
which we can do remotely, from the host machine that has the VM to
be replicated. Once the error message appears, a Configure Server
button is displayed. -
In the Enable Replication window that opens, select the checkbox next to “Enable this
computer as a Replica server.” Next, select the authentication
method for replication traffic. Kerberos will replicate without encryption, but you
can opt to use HTTPS so that the data sent from one host to another
is encrypted. Finally, choose the servers that are allowed to
replicate within the domain.
Save time and configure the servers you know will be used for
replication after you set up Hyper-V by going into the Hyper-V
settings of that server. -
Now that the destination server is configured for replication,
click Next to display the Specify Connection Parameters window.
Here, you confirm whether to use HTTP or HTTPS for the replication
traffic, and you can opt to compress the data transmitted (this is
enabled by default). Click Next.
The next screen (Figure 5) gives you the
option to deselect any virtual disks you do not want
replicated.
The wizard then lets you configure recovery history.
Configuring recovery means choosing which recovery point of the VM
being replicated you wish to store. The default option is to store
only the latest recovery point (which saves on disk space), but you
can also store additional recovery snapshots. -
The final configuration option before the actual replication
is to set how the VM should be replicated. By default, the
replicated VM is sent from host A to host B over the network.
However, in cases where bandwidth is limited, a replicated VM can be
exported to external media and then sent over the network at a later
time. A third option exists if you have already restored the same VM
on the replica server. That restored machine can be used for initial
replication. This option conserves replication time and bandwidth,
because only the changes made to the replicated VM since the VM was
restored to the destination replica server are sent over the
network.
Set replication to start immediately or schedule the process,
and click Finish.
Note
Make sure the firewall on the replica server is configured
to accept inbound replication traffic. If it isn’t, you’ll get an
“Unable to replicate” error. For Windows Firewall and Kerberos and
certificate-based (HTTPS) authenticated replication traffic,
enable the “Hyper-V Replica HTTP Listener (TCP-In)” rule in
Inbound Rules in the Windows Firewall settings.
-
Upon successfully configuring replication, you will see the
status “Sending Initial Replication” within Hyper-V Manager (see
Figure 6; click
Merge. Once you’ve done that, the VM will be in the Hyper-V Manager
of the replica server.
|