Windows Server 2012: Replication of virtual machines

By -


With Hyper-V Replica Windows Server 2012 offers a very interesting feature. It allows replication of a running virtual machine (VM) to another Hyper-V host. It is irrelevant whether the destination host is on the local network or on the Internet at a hoster.


If you previously wanted to implement high availability in virtual machines (VM), you had to invest heavily in technology cluster and shared storage. With the release of Windows Server 2012 is now an ideal disaster recovery solution for virtual machines is available, which is already part of the product and easy to integrate.

A replica is just what it sounds like: a copy of which is at a remote server VM. She calls every five minutes, thanks to the recent changes and can failover to bring every possible moment virtualized workload back online.

What is required for Hyper-V replicas?

Hyper-V -replicas can be created when two physical Windows Server 2012 servers exist. Both servers have the Hyper-V role installed. The location of the server is irrelevant: it does not matter if both servers are in the same room or on different continents. Other requirements for Hyper-V replicas are the ability to connect to both servers on an IP network, sufficient space to replicate the virtual workload and a good network bandwidth to transport the data.

Replications are extremely flexible: they work inside or outside of domains as well as inside or outside of failover clusters (same or different clusters). They also provide a completely independent non-domain single replication model – with this scenario is concerned this article.

What should be started?

First, Hyper-V role installed on both servers. This is easy to perform using the Server Manager or PowerShell 3.0. In preparation for replication also has a set-up of an external replication network to the virtual switch manager to be created. This measure must be performed on both servers, the network name should be identical. As an additional step in preparation for the use of the replication, the VM can be configured on both servers. This is necessary because both servers to replicate with each other.

Now there are two physical servers available, which work as the host or parent for the VM and use the same replication network. Now open the Hyper-V Manager and select the VM that you want to replicate. Do a right click on the VM and select “Enable Replication” from. It is not surprising that a wizard starts. Enter the FQDN of your second server in the “Specify replica server” box. An error message appears which informs you that the server is not ready to host replicas. There you will find, however, a convenient configuration button, which you should click.

Now a Hyper-V Settings window opens for the second server, where you can make the replication settings. Put a checkmark in the “Enable this for Replication Server” box. Depending on your needs you can use the unencrypted HTTP traffic (port 80) or the encrypted HTTPS communication (443). In addition, access rights can be defined for a single server, a group of servers, or all servers.

Put a check mark in each of the box “Use Kerberos (HTTP)” and “Allow Authetification From Any Server radio”. Confirm your entries. This opens a message that prompts you to the firewall rules to adjust settings. The following screenshot shows the rules on both servers should be applied.

Windows 2012: Hyper-V Replica (Picture 1)

Later in the wizard, you just continue with the default settings. There is plenty of flexibility in the configuration, which enables a flexible application of the replication.

And now the whole thing again

Replication is now possible and the initial replication has begun. If it is a small server and the network is a wide range available, you can already see on the second server, if the replicated VM appeared. If so, find a Replication tab in the lower part of the Hyper-V Manager. Select the replicated VM and go to the Replication tab. See now the collection as a replica. Repeat steps for the virtual machine on the second server.

Assuming you put the firewall rules correctly, you now have a mutually replicating system, in which each server on the one hand and on the other hand a replicated VM represents a replicating. In this way, you will find no cluster, no SAN and no shared storage, but only replicas, as the following screenshots.

You can set a specific time for replication, and whether the operation should start automatically or manually. If necessary, can be either excluded from the VHDs replication or included. Restore points can be configured, where you can select how many points you want to include in the replication process with (between 1 and 15). The transmitted data can be compressed and encrypted if desired. All settings can be adjusted in the settings window of the VM.

Failover scenarios

The Hyper-V Replication includes several failover scenarios (failover scenarios). These options result from the self-replication:

In the first VM following options are available:

You can select the following options: test failover, failover and Planned failover ….

First Test Failover

This option makes it possible for your replication VM starts properly and provides a full DR solution represents If you select this option, a new VM is created, whose status has to be confirmed by an administrator.

To ensure that your failover test does not disturb the flow of the production machine, Hyper-V can add another IP address to your replication scheme. Hyper-V can also use a new network for the failover test and use a virtual switch.

In the virtual machine settings in the “Network Adapter” there are configuration options for IPv4, IPv6, advanced configuration and a failover test for networks. This flexibility allows the administrator to perform regelmäig failover testing – that’s best practice!

If the test is passed, simply right-click the original Replication VM and select “Replication” from.Now stop the failover test and the test VM is deleted.

Second Failover

This method should be used if the primary VM did not work and your virtual workload as soon as possible must be made to run. Simply select “Replication” and “failover” from. A standard warning appears in which you must select a restore point. Then click “failover”. The replica is the replica, but for running VM. In the replication scope is the complete failover highlighted and a warning that the primary VM is offline.

Once your primary VM is running, you can trace them back through various settings to the normal mode. Explain these options is beyond the scope of this article. Microsoft has released a 82-page “Understanding and Troubleshooting Guide” for Hyper-V replica, which you can answer any questions on this topic.

Third Planned failover

A planned failover is based on the primary VM. If you select this option in the Replication submenu, a detailed check is started to ensure that replication is not the absence of the primary VM fails. Next, it is checked that all necessary precautions are taken, especially the reversal of replication to ensure that the original primary VM is up to date when it comes back online.


This article should give you soon an entry into one of the five major areas of Windows Server 2012. Perform above all the possibility, failover and high-Availibility a budget was repeatedly demanded by many small businesses. Now this is possible with no additional costs through Windows Server 2012.

He has over 5 years of experience as Online Media and Marketing Consultant, which allow him to enable companies to enhance and meet their Digital marketing goals. He has experience as both in-house and Agency Digital Marketing Experts. Ha has spent the most recent 4 years of his career focusing building Strong terms of Digital Marketing for his clients. In addition to his strengths on Building Brands and Serving Online Marketing strategy for his clients.

Comments are closed.