About this book

Enterprises need to make sure that their systems are always up and running no matter what happens. Hyper-V Replica is a free disaster recovery tool in Hyper-V 3.0 that creates and maintains copies of virtual machines (VMs). In the event of a catastrophic loss, an administrator can failover to the replica VMs and provide business continuity.

Hyper-V Replica Essentials is a step by step guide to configuring Hyper-V Replica in various deployment scenarios. This book will give you an overview of Hyper-V Replica before taking you through the prerequisites required to properly configure Hyper-V Replica. Then, through a series of practical steps, this book will enable you to take advantage of this highly beneficial disaster recovery tool.

Hyper-V Replica Essentials starts by introducing you to Hyper-V Replica and will help you understand what it does and where you can apply it. We will then move onto learning how to configure a server environment with failover capabilities based on Microsoft Hyper-V and also how to use features including Live Storage Migration. Finally, you learn how to configure Hyper-V Replica authentication, and to troubleshoot problems with Hyper-V Replica as well as solving different types of problems.

Publication date:
October 2013


Chapter 1. Introducing Hyper-V Replica

In this chapter, we will take a look at how modern data centers are built. We will see what virtualization is, and why it is very appealing to IT departments. We will look at Windows Server 2012, and how we can use some of its new features and functionalities to build a modern data center. We will learn about Hyper-V 3.0, which is the latest edition of Microsoft hypervisor. The main focus on the chapter will be to understand a new feature of Hyper-V 3.0, called Hyper-V Replica which adds business continuity and disaster recovery value to the data center.


Understanding virtualization

Virtualization is a concept in IT that has its root back in 1960 when mainframes were used. In recent years, virtualization became more available because of different user-friendly tools, such as Microsoft Hyper-V, were introduced to customers. These tools allow the administrator to configure and administer a virtualized environment easily. Virtualization is a concept where a hypervisor, which is a type of middleware, is deployed on a physical device. This hypervisor allows the administrator to deploy many virtual servers that will execute its workload on that same physical machine. In other words, you get many virtual servers on one physical device. This concept gives better utilization of resources and thus it is cost effective.


Hyper-V 3.0 features

With the introduction of Windows Server 2008 R2, two new concepts regarding virtual machine high availability were introduced. Virtual machine high availability is a concept that allows the virtual machine to execute its workload with minimum downtime. The idea is to have a mechanism that will transfer the execution of the virtual machine to another physical server in case of node malfunctioning. In Windows Server 2008 R2, a virtual machine can be live migrated to another Hyper-V host. There is also quick migration, which allows multiple migrations from one host to another host.

In Windows Server 2012, there are new features regarding Virtual Machine Mobility. Not only can you live migrate a virtual machine but you can also migrate all of its associated files, including the virtual machine disks to another location. Both mechanisms improve high availability. Live migration is a functionality that allows you to transfer the execution of a virtual machine to another server with no downtime. Previous versions of Windows Server lacked disaster recovery mechanisms. Disaster recovery mechanism is any tool that allows the user to configure policy that will minimize the downtime of systems in case of disasters. That is why, with the introduction of Windows Server 2012, Hyper-V Replica is installed together with Hyper-V and can be used in clustered and in non-clustered environments. Windows Failover Clustering is a Windows feature that is installed from the Add Roles and Features Wizard from Server Manager. It makes the server ready to be joined to a failover cluster. Hyper-V Replica gives enterprises great value, because it is an easy to implement and configure a Business Continuity and Disaster Recovery (BCDR) solution. It is suitable for Hyper-V virtualized environments because it is built in the Hyper-V role of Windows Server 2012. The outcome of this is for virtual machines running at one site called primary site to be easily replicated to another backup site called replica site, in case of disasters. The replication between the sites is done over an IP network, so it can be done in LAN environments or across WAN link. This BCDR solution provides efficient and periodical replication. In case of disaster it allows the production servers to be failed over to a replica server. This is very important for critical systems because it reduces downtime of those systems. It also allows the Hyper-V administrator to restore virtual machines to a specific point in time regarding recovery history of a certain virtual machine.


To create a failover cluster, there must be at least two physical servers.

In the following screenshot, we can see a simple Hyper-V Replica scenario consisting of a Primary Site and a Replica Site:


Prerequisites for Hyper-V Replica

Hyper-V Replica has a few prerequisites that you must fulfill before you can begin deployment. These prerequisites are as follows:

  • Windows Server 2012 installed on physical machines

  • Certificates for data encryption (optional)

  • Network connection between primary and replica sites


It is important to say that for Hyper-V to work, both sides can have vendor-neutral servers and storage. It means that server model and storage model don't have to be the identical on both sides.


Installing Hyper-V

Hyper-V Replica is a built-in feature of the Hyper-V Role Version 3.0. Hyper-V 3.0 is only available if you have Windows Server 2012. Hyper-V servers can be part of a Workgroup or an Active Directory Domain. When you deploy Hyper-V Replica in standalone hosts environment, primary and replica sites can be in different Active Directory domains. If you deploy Hyper-V Replica in a failover cluster environment then the Hyper-V servers have to be part of a same Active Directory domain. Hyper-V Replica is installed together with the Hyper-V Role. To install the Hyper-V Role on a server, you have to use the Add Role and Feature Wizard, found in Server Manager. When the installation of Hyper-V role is finished, the server must be restarted.

  1. Navigate to Server Manager | Add Roles. When you open it, you will see a window like the following screenshot. From the list of roles select Hyper-V.

  2. The wizard asks you if you want to create Virtual Switches. A Virtual Switch is deployed on a physical network adapter to allow multiple virtual machines to use it. If you don't want to create a switch within the wizard, you can do it later from the Hyper-V Management console. The next screenshot shows the virtual switch configuration window:

  3. Setup your Hyper-V server for live migration. To do this, check the Allow this server to send and receive live migrations of virtual machines checkbox. The following screenshot shows the configuration window for live migrations:

  4. Specify the default location where virtual machine data files will be stored. The next screenshot shows the configuration window for virtual hard disk location:

  5. In the final step, check the Restart the destination server automatically if required checkbox, and then click on Install to finish configuring and start the Hyper-V installation. You can see the configuration window in the next screenshot:


Hyper-V Replica functionalities

The main functionality of Hyper-V Replica is to allow virtual machine replication over a LAN/WAN to a remote site with only the functionalities included in Windows Server 2012. For all this to work, there are four core Hyper-V Replica functionalities that allow this. These functionalities are as follows:

  • Replication

  • Change tracking

  • Network

  • Hyper-V Replica Broker

Hyper-V Replica replication manager

The main task of Hyper-V Replica replication manager is replication of Hyper-V Replica enabled virtual machines. It is responsible for: initial replication, change replication, failover, failback, and test failover. When a live migration is performed, the replication manager halts replication and resumes it after the migration is completed.

Hyper-V Replica replication tracker

The main tasks of Hyper-V Replica replication tracker are to save the virtual machine state and replicate only the changes to the replica site. The default replication interval is five minutes. All of the changes that happened inside the virtual machine for the last five minutes are replicated to the replica site. Replication tracker also gives you the opportunity to set different recovery history settings for your virtual machines. The following three are the recovery history settings:

  • Store only the latest recovery point: Only one point-in-time state of the virtual machine is kept at the replica site, which is the current state.

  • Store multiple recovery points: Multiple recovery point means that there can be more than one point-in-time restore point of the virtual machine. By default, multiple recovery point replication happens every 60 minutes. After the limit of recovery points is reached the oldest recovery point is overwritten.

  • Store multiple recovery points with Application-Consistent: This type of replication also saves the application data that is running inside the virtual machine. It uses the WMI (Windows Management Instrumentation) Service to extract the data from the applications.

Hyper-V Replica broker manager

The main tasks of Hyper-V Replica broker manager are to send and receive replication traffic in a failover cluster environment. When you have a failover cluster, whether it is in your primary or replica site, you must install Hyper-V Replica Broker role. The role is installed on the failover cluster like any other failover cluster role. This role looks for live migrations of Hyper-V Replica enabled virtual machines. It provides right and continuous replication of virtual machines in a cluster environment.

In the following image, we can see how Hyper-V Replica Broker role works:


Security considerations

Restricting access to Hyper-V is very important. You want only authorized users to have access to the management console of Hyper-V. When Hyper-V is installed, a local security group on the server is created. It is named Hyper-V Administrators. Every user that is member of this group can access and configure Hyper-V settings. Another way to increase security of Hyper-V is to change the default port numbers of Hyper-V Authentication. By default, Kerberos uses port number 80, and Certificate Authentication uses port number 443. Certificated also encrypts the traffic generated from primary to replica site. And at last, you can create a list of authorized servers from which replication traffic will be received.


Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

The following screenshot shows the security options that you can configure in Hyper-V Replica:



In this chapter, we learned about what virtualization is and why is it important to modern enterprises. We learned about Hyper-V, which is a platform for virtualization, how to install it, and what its functions are. We were introduced to a new feature of Windows Server 2012 called Hyper-V Replica. We took a look at its functionalities, its values, and components.

In the next chapter, we will learn how to build a modern data center, and set up a failover cluster environment with Windows Server 2012.

About the Author

  • Vangel Krstevski

    Vangel Krstevski is an IT engineer with 5 years of experience in engineering IT Systems based on Microsoft guidelines. He is a strong team player with an affinity for details. His strengths include excellent communication skills, hands-on experience with various Microsoft products, and the ability to manage conflicts and accomplish demands to the agreed standards and timelines. He is currently employed by Re-Aktiv, a software development and consultancy company from Skopje, Macedonia, which specializes in the area of electronic services and company public registry solutions. His main areas of expertise are server virtualization, hybrid cloud scenario design and implementation, and Business Continuity along with System Center. He has worked on many projects, both internal and commercial, as a consultant for Microsoft server-side platforms. He has already written a book titled Hyper-V Replica Essentials, Packt Publishing, which helps organizations to implement business continuity and disaster recovery strategies.

    Browse publications by this author
Hyper-V Replica Essentials
Unlock this book and the full library for $5 a month*
Start now