Working With Replicas in Hyper-V 3.0 (Part 3)

If you would like to read the other parts in this article series please go to:

Introduction

In the previous article in this series, I explained that while it is not overly difficult to set up replication between two Hyper-V servers, proper planning is essential. The actual method that you will use to set up replication varies depending upon whether or not a clustered host is involved in the process. In this article, I want to show you how to set up replication between two non-clustered hosts. After we have performed this type of replication, and I have shown you how to manage and maintain the replicas I will eventually turn my attention to replicating clustered hosts.

Setting Up Replication

In Hyper-V, replication is performed at the virtual machine level, not at the server level. Even so, there are some server level operations that must occur before you can initiate replication.

In any replication scenario one host server will act as the source and another will act as the destination. The source server contains the actively running virtual machines that you want to replicate, and the destination server will serve as a repository for the replica virtual machines. The configuration process begins on the replica server.

In order to prepare for replication, you have to configure the destination server to accept virtual machine replicas. To do so, open the Hyper-V Manager on the destination server. When the console opens, right click on the listing for your host server and choose the Hyper-V Settings command from the resulting shortcut menu. When you do, Windows will display the Hyper-V Settings dialog box. Select the Replication Configuration container, as shown in Figure A.

Image
Figure A:
Open the Hyper-V Settings dialog box and select the Replication Configuration container.

If you look at the figure above, can see that the first thing that you need to do to enable replication is to select the Enable this Computer as a Replica Server check box. Doing so will allow the server to receive replicas from other Hyper-V hosts.

The next step in the process is to select an authentication protocol. Microsoft gives you two different choices. You can use Kerberos authentication over HTTP, or you can use certificate based authentication over HTTPS. Microsoft recommends that you use Kerberos authentication whenever possible, because it tends to be a little bit more secure and it is easier to set up. However, using Kerberos is not always an option. Organizations must use certificate based authentication for Hyper-V replicas if the source server and the destination server do not exist within the same Active Directory environment.

The third thing that must be done on the destination server in preparation for replication is to specify the servers that are allowed to replicate virtual machines to the host. Once again, Microsoft gives you a couple of options. One option is to allow replication from any authenticated host. If you choose this option then the only thing that you have to do is to specify a path where the virtual machine replicas will be stored on the destination host.

Your other option is to allow replication only from specified servers. This is generally considered to be the more secure option because it allows you to limit which source servers are able to replicate virtual machines to the destination server. If you choose to use this option then you will have to specify the name of the source server containing the virtual machines that you want to replicate and the folder in which you want to store the virtual machine replicas on the destination host.

If you choose to specify individual host servers then you will also need to specify a trust group for each host. The idea behind the trust group is that virtual machines are not statically bound to an individual host. Virtual machines can be live migrated from one host to another, even if you are not using failover clustering. A trust group is simply a group of host servers that can live migrate virtual machines between one another. The reason why a trust group must be specified is because the source server that is hosting a virtual machine today might not be the same source server that is hosting the virtual machine tomorrow. You don’t want replication to break down just because a virtual machine is live migrated from one host to another.

Now that we have set up the destination server, let’s turn our attention to the source server. As I previously mentioned, replication is enabled on a per virtual machine basis. To replicate a virtual machine, open the Hyper-V Manager, right click on a virtual machine, and select the Enable Replication command from the resulting shortcut menu, as shown in Figure B.

Image
Figure B:
Right click on the virtual machine and select the Enable Replication command from the resulting shortcut menu.

At this point, Windows will launch the Enable Replication wizard. Click Next to bypass the wizard’s welcome screen. You should now see a prompt asking you to enter the name of the replica server. This is where you specify the name of the destination host. Click Next and you will be prompted to specify the type of authentication that you want to use within the replication process. The authentication that you choose must match the type of authentication that you configured the destination host to use.

This screen also contains a check box that you can use to compress data as it is transmitted over the network. Microsoft recommends that you enable compression, but compression is not necessarily suitable for every type of situation. When you compress replication traffic, it does exert a bit of a load on the CPU. Therefore, if the host is already strapped for CPU resources than you probably do not want to enable compression.

The next screen will prompt you to select the virtual hard disks that you want to replicate. In most cases, you will want to replicate all of the virtual hard disks. The exception would be a situation in which a dedicated virtual hard disk held the paging file for the virtual machine.

Click Next and you will be prompted to specify the number of recovery points that you want to store for the virtual machine. Normally a virtual machine replica is nothing more than a fairly up-to-date copy of a production virtual machine. However, using recovery points gives you the ability to roll the replica back to an earlier point in time. It is worth noting however, that replicas do consume additional disk space on the destination host.

Finally, you are prompted to specify the method to be used for the initial replication as well as when you would like the replication process to begin. In most cases, the initial replication will occur over the network and begin immediately. You can however, use a copy of the virtual machine to seed the replication process so that you do not have to transmit the entire contents of a virtual machine across the network.

Click Next and you will see a screen detailing the configuration options that you have chosen. Take a moment to make sure that these options are correct and then click Finish. The replication process will now begin.

Conclusion

In this article, I have explained how to set up a simple Hyper-V replica. In the next article in this series, I will show you how to work with the replica that you have created.

If you would like to read the other parts in this article series please go to:

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top