www.it-ebooks.info
Hyper-V Replica Essentials
Ensure business continuity and improve your disaster
recovery policy using Hyper-V Replica
Vangel Krstevski
professional expertise distilled
P U B L I S H I N G
BIRMINGHAM - MUMBAI
www.it-ebooks.info
Hyper-V Replica Essentials
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2013
Production Reference: 1031013
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78217-188-1
www.packtpub.com
Cover Image by Gerard Eykhoff ()
www.it-ebooks.info
Credits
Author
Project Coordinator
Vangel Krstevski
Amigya Khurana
Reviewers
Proofreader
Adam Ball
Clyde Jenkins
Milton Goh
Indexer
Monica Ajmera Mehta
Acquisition Editor
Rebecca Youe
Graphics
Lead Technical Editor
Yuvraj Mannari
Sharvari Tawde
Production Coordinator
Technical Editors
Arvindkumar Gupta
Pragnesh Bilimoria
Sandeep Madnaik
Larissa Pinto
Cover Work
Arvindkumar Gupta
www.it-ebooks.info
About the Author
Vangel Krstevski is an IT prodigy, excelling in virtualization and network design.
He is an expert in virtualization deployment and management. He is a strong team
player with an affinity for details. His strengths are excellent communication skills,
hands-on experience with various Microsoft products, ability to manage conflicts,
and accomplish demands to agreed standards and timelines.
He has experience in planning, designing, deploying, and managing various Microsoft
products. All of this has been acquired in his three years of experience in IT, working
as a System and Network Engineer.
His product skills set include Microsoft infrastructure technologies, such as Hyper-V,
System Center Suite, Windows Server, MS SQL Server, Exchange Server, IIS, Active
Directory, and Forefront. He also has knowledge of configuring DELL, SonicWall,
and CISCO networking equipment.
He is CISCO CCNA 640-802 certified.
He currently works at Re-Aktiv, a software consulting company in Skopje, Macedonia.
He led the implementation of Microsoft System Center Operations Manager for the
Central Registry of the Republic of Macedonia.
www.it-ebooks.info
About the Reviewers
Adam Ball has been in various engineering/leadership roles in IT for more
than 15 years. Over the last seven years, he has become focused on virtualization
and Microsoft UC products. In addition, he has spent time as a Unix/Linux
administrator, and as a storage administrator.
ExtraTeam is a leading provider of innovative IT solutions to corporate and
public-sector businesses. They are certified experts at information and communication
technologies, and convergent services. ExtraTeam designs, implements, and supports
infrastructure projects for customers across a variety of markets. Our engineers are
experienced at network architectures, high availability, infrastructure optimization,
datacenter virtualization, SharePoint, video conferencing and telepresence, security,
storage, and network resource management.
www.it-ebooks.info
Milton Goh has been in the Information Technology and Management field since
2005. He started as a Software Developer meddling with Visual Basic .NET and later
moved on to Visual C# .NET as his primary programming language. He has played
multiple roles throughout the years in his career as a developer, consultant, and
architect completing more than two dozens of small to large projects delivered to
small- and medium-sized businesses, and enterprise organizations.
He currently works with Dimension Data (Singapore) as a consultant that works
with projects that leverage Microsoft products to solve business problems. On
top of that, he leads a team of developers that does development work on an IT
Service Management Tool that helped enterprise customer to adopt the whole ITIL
framework. He also joined the top league players in the organization as a Premier
Field Engineer to help enterprise customer solve problem(s) they faced with the
Microsoft solutions.
Prior to joining Dimension Data (Singapore), he has worked in a Small and Medium
Enterprise (SME) as a Solutions Consultant that deals with Microsoft solutions for
the government bodies.
Over the years, he has worked with most Microsoft products but has strong
knowledge in Microsoft SharePoint and Windows Servers.
During his free time, he would contribute through user groups in Singapore and
through online forum. He also spends time writing articles at his web blog, and
he is an author at the Spiffy committee (www.spiffy.sg).
I would like to thank the team at Packt Publishing, for they have
given me a chance to be a Technical Reviewer for this amazing book.
I would like to thank my family for supporting me all along for
the time I spent with my lab environment, when I am not at work.
Lastly, I would like to thank the most important lady in my life,
Cindy Askara, for her understanding all the while when I am busy
with my research and development work.
www.it-ebooks.info
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to
your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub
files available? You can upgrade to the eBook version at www.PacktPub.com and as a print
book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
TM
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book
library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
•
Fully searchable across every book published by Packt
•
Copy and paste, print and bookmark content
•
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine entirely free books. Simply use your login credentials for
immediate access.
Instant Updates on New Packt Books
Get notified! Find out when new books are published by following @PacktEnterprise on
Twitter, or the Packt Enterprise Facebook page.
www.it-ebooks.info
www.it-ebooks.info
Table of Contents
Preface1
Chapter 1: Introducing Hyper-V Replica
5
Understanding virtualization
Hyper-V 3.0 features
Prerequisites for Hyper-V Replica
Installing Hyper-V
Hyper-V Replica functionalities
Hyper-V Replica replication manager
Hyper-V Replica replication tracker
Hyper-V Replica broker manager
Security considerations
Summary
5
5
7
7
10
10
10
11
11
12
Chapter 2: Failover Clustering
13
Chapter 3: Configuring Hyper-V Replica
33
The Server Message Block protocol
Installing and configuring the SMB server
Setting up iSCSI connections
Setting up networking
Setting up security permissions on SMB file shares
Setting up a failover cluster
Migration of virtual machines
Summary
Hyper-V Replica requirements
Hyper-V Replica in standalone Hyper-V hosts environment
Configuring Hyper-V replica on a server in a replica site
Configuring virtual machines for replication
Configuring firewall rules
www.it-ebooks.info
13
14
18
21
23
23
29
31
33
34
34
36
46
Table of Contents
Virtual machine replication in Failover Cluster environment
Failover scenarios
Test failover
Planned failover
Unplanned failovers
Summary
49
51
52
52
53
53
Chapter 4: Authentication in Hyper-V Replica
55
Chapter 5: Administrating Hyper-V Replica
71
Summary
Index
77
79
Hyper-V Replica authentication types
Nonencrypted communication
Encrypted communication
Creating a certificate template
Requesting and importing a certificate
Authenticating with a self-signed certificate
Summary
Managing Hyper-V Replica
Primary site management
Replica site management
Administration of certificates
Summary
[ ii ]
www.it-ebooks.info
55
56
57
58
64
69
69
71
72
73
75
76
Preface
Hyper-V Replica Essentials is a step-by-step guide for configuring Hyper-V Replica
in various deployment scenarios, which will help you learn how to configure this
new feature and improve the systems' availability in your datacenter. This book will
give you an overview of what Hyper-V Replica is. Then, it will take you through
all the prerequisites you need to properly configure it, which will help you take
advantage of this easy-to-configure disaster recovery tool. You will learn how to set
up a modern datacenter with the help of a new concept called Server Message Block
(SMB) from Windows Server 2012. We will also take a look at how you can configure
Hyper-V Replica in your existing environment, whether it is a clustered or nonclustered environment, and how to secure your data with the use of certificates.
What this book covers
Chapter 1, Introducing Hyper-V Replica, will take a deep dive into virtualization and
its importance to the modern enterprises. You will also get to know about the new
features of Windows Server 2012 called Hyper-V Replica; its functionalities, values,
and components.
Chapter 2, Failover Clustering, introduces a new concept for file sharing and
application data storage called SMB. It will also show you how install Hyper-V
on a server and join servers in a Failover Cluster.
Chapter 3, Configuring Hyper-V Replica, is all about different configurations of
Hyper-V Replica, depending on the various infrastructure models. This chapter
will teach you how to configure Hyper-V in a cluster environment or in a standalone
host environment.
Chapter 4, Authentication in Hyper-V Replica, will show you how to encrypt the
communication between the Primary and the Replica site with the help of certificates.
www.it-ebooks.info
Preface
Chapter 5, Administration of Hyper-V Replica, will teach you how to maintain Hyper-V
Replica configuration and troubleshoot the Hyper-V Replica issues.
What you need for this book
The only thing you need for this book is a Microsoft Windows Server 2012.
Who this book is for
This book is excellent for Windows Server administrators who want to improve
their system availability and speed disaster recovery. It is imperative that you
have experience in Hyper-V deployment because Hyper-V Replica is built in
the Hyper-V platform.
Conventions
In this book, you will find a number of styles of text that distinguish among different
kinds of information. Here are some examples of these styles, and an explanation of
their meaning.
New terms and important words are shown in bold. Words that you see on the
screen, in menus or dialog boxes for example, appear in the text like this: "clicking
the Next button moves you to the next screen".
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
[2]
www.it-ebooks.info
Preface
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or may have disliked. Reader feedback is important for us
to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to ,
and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.
Downloading the example code
You can download the example code files for all Packt books you have purchased
from your account at . If you purchased this book
elsewhere, you can visit and register to have
the files e-mailed directly to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you find a mistake in one of our books—maybe a mistake in the text or the
code—we would be grateful if you would report this to us. By doing so, you can save
other readers from frustration and help us improve subsequent versions of this book.
If you find any errata, please report them by visiting />submit-errata, selecting your book, clicking on the errata submission form link,
and entering the details of your errata. Once your errata are verified, your submission
will be accepted and the errata will be uploaded on our website, or added to any list
of existing errata, under the Errata section of that title. Any existing errata can be
viewed by selecting your title from />
[3]
www.it-ebooks.info
Preface
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media.
At Packt, we take the protection of our copyright and licenses very seriously. If you
come across any illegal copies of our works, in any form, on the Internet, please
provide us with the location address or website name immediately so that we can
pursue a remedy.
Please contact us at with a link to the suspected
pirated material.
We appreciate your help in protecting our authors, and our ability to bring you
valuable content.
Questions
You can contact us at if you are having a problem with
any aspect of the book, and we will do our best to address it.
[4]
www.it-ebooks.info
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.
www.it-ebooks.info
Introducing Hyper-V Replica
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:
Primary Site
Replica Site
Replication
traffic
Production Server C
Production Server B
WAN link
Production Server A
Production Server A
Production Server B
Production Server C
[6]
www.it-ebooks.info
Chapter 1
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.
[7]
www.it-ebooks.info
Introducing Hyper-V Replica
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:
[8]
www.it-ebooks.info
Chapter 1
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:
[9]
www.it-ebooks.info
Introducing Hyper-V Replica
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.
[ 10 ]
www.it-ebooks.info
Chapter 1
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:
Replica Site
Primary Site
Hyper-V
Replica
Broker Role
Windows Server 2012 Failover
Cluster
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 . If you
purchased this book elsewhere, you can visit ktpub.
com/support and register to have the files e-mailed directly to you.
[ 11 ]
www.it-ebooks.info
Introducing Hyper-V Replica
The following screenshot shows the security options that you can configure in
Hyper-V Replica:
Summary
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.
[ 12 ]
www.it-ebooks.info
Failover Clustering
In this chapter, we will take a look at Windows Failover Clustering, which is a
feature of Windows Server. It allows the administrator to join separate Hyper-V
servers in one cluster. This failover cluster ensures virtual machine availability in
case of Hyper-V host malfunction.
The Server Message Block protocol
When an enterprise starts to build a modern datacenter, the first thing that should be
done is to set up the storage. With the introduction of Windows Server 2012, a new
improved version of the Server Message Block (SMB) protocol is introduced. The
SMB is a file sharing protocol. This new version is 3.0 and is designed for modern
datacenters. It allows administrators to create file shares and deploy critical systems
on them. This is really good, because now administrators have to deal with file
shares and security permissions, instead of complex connections to storage arrays.
The idea is to set up one central SMB file-sharing server and attach the underlying
storage to it. This SMB server initiates connection to the underlying storage. The
logical disks created on the storage are attached to this SMB server. Then different
file shares are created on it with different access permissions. These file shares can
be used by different systems, such as Hyper-V storage space for virtual machine
files, MS SQL server database files, Exchange Server database files, and so on. It is
an advantage, because all of the data is stored on one location, which means easier
administration of data files.
It is important to say that this is a new concept and is only
available with Windows Server 2012. It comes with no
performance degradation on critical systems, because SMB
v3.0 was designed for this type of data traffic.
www.it-ebooks.info
Failover Clustering
Installing and configuring the SMB server
In order to use SMB v3.0, you have to install Windows Server 2012 on your SMB
file-sharing server. After that, it is really simple, because SMB installs as a Windows
Server Role from the Add Remove Roles Wizard. The following are the steps to
create an SMB file share:
1. From the Add Roles and Feature Features Wizard, select File Server role
under File And Storage Services (Installed) | File and iSCSI Services.
2. After the role is successfully installed from the Server Manager, locate and
access on the left-hand side File and Storage Services.
[ 14 ]
www.it-ebooks.info