Posey's Tips & Tricks

Out-of-Band Replication for Hyper-V

Is your replication going too slow? Here's how to speed it up.

Hyper-V replication is an awesome tool for helping smaller organizations to meet their business objectives. If something were to happen to the organization's virtual machines or the hosts on which they are running, there are other copies on a replica host ready to go. As great as Hyper-V replication might be, the initial replication process can sometimes be problematic. This is especially true for situations in which large (or a large number of) virtual machines need to be replicated across a slow connection.

When replication is performed over a low speed connection, the end result is usually that the initial replica seeding process (the process of making an initial copy of the replicated virtual machine) will take a long time. I have seen this process take weeks to complete. The best way to avoid this problem is to perform the initial replication process out of band.

Before I tell you how out of band replica seeding works, I need to give you a quick word of caution. Any time that you are thinking about replicating Hyper-V virtual machines, you must be mindful of the virtual machines' change rate. To show you why this is so important, let me give you an example that has nothing to do with Hyper-V.

A little over ten years ago, I decided that I was going to begin backing my data up to the cloud. At the time, I had a painfully slow Internet connection and knew that it would take months to make the initial data copy. Even though I was willing to accept the slow seeding process, it ultimately did not matter. My Internet connection could not keep pace with the rate at which new data was being created. In other words, even if I had a fully seeded backup of my data in the cloud, I would never have been able to keep the backup current because my data change rate overwhelmed my Internet connection.

This same basic principle applies to Hyper-V. There is a certain amount of bandwidth available between your primary Hyper-V host and the replica host. The virtual machines that you are replicating need to collectively have a data change rate that the existing bandwidth can comfortably handle (plus extra capacity to accommodate demand spikes). Otherwise, replication will eventually fail. Yes, you can use tricks like compression to squeeze a bit more data capacity out of your available bandwidth, but at the end of the day there is no getting around the need for having sufficient bandwidth to accommodate your data's change rate.

So with that said, let's get back to the topic at hand. What if you have plenty of bandwidth to accommodate the changes to your data, but not enough bandwidth to seed the initial replica in a timely manner? The solution is to use out of band seeding. The process involves writing the initial replica to removable media and then ingesting it into the replica server rather than trying to send the initial replica across the network.

The process for setting up out of band seeding works almost identically to that of enabling replication in the usual way. The trick is that when you are prompted to choose an initial replication method, you will have to tell Hyper-V to send the initial copy using external media. Upon doing so, the replica server will display an Import Initial Replica option (it appears on the replication menu) that you can use to import the replica from disk. Once you have finished importing the disk based replica, the replication process should work exactly like any other set of Hyper-V replica pairs.

The one bit of advice that I would give you with regard to out of band replica seeding is that once you begin sending the initial copy to external media, it's a good idea to try to work through the import process as soon as you realistically can. The reason for this is that the replicated VMs are presumably in use, meaning that new and changed data continue to pile up while you are working through the seeding process. You will want to expedite the seeding process to minimize the backlog of fresh data that needs to be replicated.

About the Author

Brien Posey is a 21-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.


comments powered by Disqus