How to setup a Virtual Machine with Hyper-V Replica

 

In Windows Server 2012 Hyper-V Microsoft released a new feature called Hyper-V Replica. I already made a blog post which describes this new feature: Hyper-V Replica – The Game Changer. In this post I cover how you can enable replication of a Virtual Machine in Hyper-V.

First you have to allow replication on the Hyper-V Replica host. You can set up the replication using HTTP or HTTPS and you can also add source Hyper-V hosts.

Enable Hyper-V Replica

After you have enabled replication on the Hyper-V Replica host (target host) you can enable replication on the Virtual Machine on the source Hyper-V host.

Enable VM ReplicationThe Replica Wizard will start. On the first window set the replica target server.

Enable VM Replication Replica Server

The wizard will check if the replication on the target server is enabled and which protocol is available. If you are replicate the Virtual Machine over a WAN network you can also enable compression.

Enable VM Replication Replica Connection Settings

You can select which VHD or VHDX should be replicated. For example you could set the pagefile on a different VHD and remove this VHD from the replication process.

Enable VM Replication Replica VHDs

On the next window you can configure the Recovery History settings. Here you can enable additional recovery points which can be restored. This allows you choose from different points in time, for example if a recovery point is corrupt. It also possible to enable Application-consistent snapshots. This will use the Volume Shadow Copy Service (VSS) to create snapshots of the Virtual Machine.

Enable VM Replication Replica Recovery History Settings

Choose the Initial Replication method. You can choose between three different options, the first one will send the initial copy of the virtual machine over the network without additional work. If the network bandwidth is limited you can also copy the initial copy to a USB disk and import the copy on the target replica server. If the virtual machine already exists, for example with a restore, you can also choose an existing virtual machine.

Enable VM Replication Replica Initial Replication

If you choose to transfer the initial copy with a external media, Hyper-V will create the Virtual Machine on the target replica server and with a right click you can import the virtual machine data (VHD).

Enable VM Replication Target Import Initial ReplicaAfter you have done all the steps you get a summary of your settings.

Enable VM Replication Replica OverviewIf you have choose to replicate the virtual machine over the network the initial replication will start.

Enable VM Replication Source Replication State After the replica is created you can configure the replica virtual machine on the replica host. For example you can configure a test network for the virtual machines. With this solution you can do a test failover in a different network.

Enable VM Replication Target Test Failover Settings

Now if the network on your recovery site is different from the network from your source site and you would have to chance the IP addresses on server you can also do this before a actual failover happens.

Enable VM Replication Target Failover TCP IP SettingsBecause in case of a disaster you want have time to configure each server with a new IP address you should definitely make use of this feature.

I hope this post helps to understand how to set up Hyper-V Replica. If you need more information about Hyper-V Replica I recommend you my blog post: Hyper-V Replica – The Game Changer.