To my wife, Crystal, and my son, Evan, for their continued love, their support of my IT community work, and, more generally, for always putting up with my shenanigans and tomfoolery.
—Andy
To the ladies of my family—June, Ann, Sarah, and my granddaughters Lauren and Hannah
Thank you for being a treasured part of my life.
—Richard
This book is designed to be a tutorial in Hyper-V administration. As such, we recommend that you read the chapters in order. You’ll probably find yourself referring to earlier chapters, as you work through the book. When you’ve finished the book, you may find yourself referring to a chapter, to help solve a problem. That’s fine. It’s your book!
This book takes a task-oriented approach to Hyper-V management, and as such, you will be able to immediately apply some of the knowledge gained in the day-to-day administration of Hyper-V.
While you may feel comfortable conducting some of these tasks. We have gone out of our way to instruct you as to which tasks require extra care and attention. When it comes to infrastructure management tasks and virtualization, there may be times when you are working with some very sensitive items, such as storage, and any misconfiguration and/or incorrect setting could be potentially disastrous. We’re not trying to scare you, just pointing out the actual pitfalls.
In short, this text is designed to take a junior IT professional, who knows nothing about Hyper-V or virtualization, and bring him or her to competency.
In a few more words, one constant in the world of IT is that things are always changing. Businesses must stay competitive, which means a need for more efficiency. Many are turning to virtualization as one of these efficiencies. Most IT departments and hiring managers now require virtualization know-how as a core skill for most IT jobs. If you’re a junior level IT professional looking to branch out, get a promotion, or increase your job security, this book is for you. If you’re looking to change roles within your organization, the knowledge gained from this book will help. Maybe you’re a developer who would like to understand more about the test environment you’re working in.
Another common situation today is a merger, in which the incoming company already has some Hyper-V hosts in place. Or maybe your company has historically gone with a different vendor, such as VMware, and you’re in the process of moving to Hyper-V, for its many advantages and cost savings. If you’re an IT pro finding yourself in this situation, this book is for you as well!
Whatever the reason, you’ll find Hyper-V to be a mature, powerful, but still-evolving technology that will aid you in your everyday work, if leveraged and utilized properly. This book will teach you the best practices for using Hyper-V on a day-to-day basis.
The installation and configuration of Windows Server Operating Systems
Basic AD management
NTFS file level permissions
IPv4 networking
Understanding of server hardware platforms
Basic knowledge of PowerShell
Storage concepts, including: direct-attached storage, network-attached storage (NAS), iSCSI, NFS, and Fibre Channel
In Chapter 1 , we introduce you to Hyper-V and virtualization, setting the scene for future chapters. Chapter 2 teaches you how to configure your Hyper-V host and connect to virtual machines (VMs). You may think that odd, but we want you to be using the knowledge and skills you learn from this book as soon as possible, and once you can connect to a VM, you can use your Windows Server knowledge to administer that system.
The next set of chapters are concerned with creating and administering VMs. Starting with their creation in Chapter 3 , we move on to configuring VM resources, in Chapter 4 . You will learn how to manage Hyper-V Integration Services in Chapter 5 . Integration services are important to get right, as they control how your VM communicates with the Hyper-V host.
Chapter 6 focuses on managing and modifying VM files. Your VM is a set of files existing on your Hyper-V host. Their location, protection, and management are vital to the well-being of your virtual environment. Chapter 7 extends your knowledge of the underlying file structure, when we consider checkpoints—a point-in-time snapshot of a VM. You’ll also learn how to effectively use checkpoints and when not to use them.
If you’ve worked in IT for any length of time, you’ll know that networking (Chapter 8 ) and storage (Chapter 9 ) are essential parts of your environment. In these two chapters, you’ll learn how these aspects of your environment are virtualized and how you manage them.
Your users expect their applications to be available. In many cases this means you must implement some kind of high availability. In a Hyper-V environment, this could mean that you cluster the hosts (Chapter 10 ) or the VMs (Chapter 12 ). You also must know how to manage the clusters (Chapter 11 ). We recommend that you read these three chapters as a group, as they are closely related.
In Chapter 13 , you’ll learn how to monitor your Hyper-V hosts and the virtual machines and a little bit about capacity planning.
The next three chapters are loosely related. Chapter 14 will teach you how to migrate VMs between Hyper-V hosts. There are a number of techniques you’ll learn, as well as when to use each technique. Chapter 15 extends these thoughts, by showing you how to move existing workloads to Hyper-V. Disaster recovery is an important topic for all administrators. You’ll learn how to use a Hyper-V replica in Chapter 16 .
There’s a change of emphasis in Chapter 17 , which is a bit more focused on applications. Containers have been a part of the Linux landscape for a number of years, and now they’re available on Windows. The chapter will show you how to install the containers feature, as well as create and manage containers.
Chapter 18 will help those of you with large Hyper-V environments, when we look at using System Center Virtual Machine Manager.
The book closes with Chapter 19 , in which we discuss ways to extend your learning. As administrators, there’s always something new to learn, and we’ll provide our thoughts on a number of topics you should consider.
Most of the chapters include step-by-step instructions to perform the administrative tasks under discussion. We also provide PowerShell code that will perform the task. We recommend that you learn to use the PowerShell commands, so that you can automate your tasks and so make your life easier.
There are a number of ways to create a lab environment for the practical examples in this book. The ideal way would be if you had a number of spare servers and several terabytes of storage, so you could create a lab that approached a real production environment. Most of us aren’t that lucky, so we’ll supply a few suggestions for a lab.
It is possible to “nest” virtualized Hyper-V instances on top of a VMware ESXi host, but quite a bit of tweaking is needed. As far as nesting Hyper-V on top of Hyper-V, it is only supported in Windows Server 2016, later versions of Windows 10, and Windows Server 2019.
You could use nested compute instances in Microsoft Azure, but keep in mind that there is a monthly cost associated with that.
If you have a bit of spare hardware that can be used for your lab environment, you’ll at least want two physical hosts with a low-end NAS, or other sharable storage, to be used by them. You’ll also need a gigabit switch and a couple of Ethernet cables.
You can manage most of the book with a single machine with 16GB RAM. You need to be very careful about what else is running, but it is possible to perform most of the practical work in the book. As usual, more is better!
We have assumed that you can install and configure Windows Server and install the Hyper-V feature.
It’s always a surprise when you stop to consider the number of people it takes to actually produce a book such as this. Our names are on the cover, but there is a whole list of people who contribute behind the scenes. This is one of the best bits to write—in which we get to thank them for the hard work they’ve put in to this book.
First, we’d like to thank the Microsoft Hyper-V team, for the product. If they hadn’t produced such a great hypervisor that people were interested in using, we’d have nothing to write about.
The members of the team Apress put together for this book have been superb: Joan Murray, Laura Berendson, and Jill Balzano.
There were a number of reviews of the manuscript during its development. The individual reviewers gave their time to read and comment on the book, and we’re very grateful for their input. They helped improve the book, by making us think about their comments.
Notwithstanding the input of so many people, any errors of omission, or commission, are still ours.
Andy would like to thank Richard for always being there to lend a hand when the task list became too large and whose contributions to this text have been invaluable. This book would not have been possible without you, my friend.
Richard would specifically like to thank Andy for the opportunity to contribute to the book and for the many interesting discussions about Hyper-V and related technologies. It’s been a very enjoyable experience.
is based in the United States and currently has the distinct pleasure of acting as a Technical Evangelist for Altaro Software. Andy is heavily involved in the IT community, on Altaro’s behalf, in several different ways, including podcasts, webinars, blogging, and public speaking. Overall, Andy has spent the last 15+ years in IT, with areas of focus including virtualization, cloud services, VMware, and the Microsoft server stack, with an emphasis on Hyper-V and clustering. Andy spends a great deal of time working with the IT community as one of Microsoft’s cloud and datacenter management Most Valued Professionals (MVPs). Andy has a passion for technology and always enjoys talking about tech with peers, customers, and fellow IT pros over a cup of coffee or a cold beer.
is based in England. With more than 25 years of experience in various aspects of IT, Richard specializes in the Microsoft environment at an architectural level, especially around Active Directory (AD), Exchange, SQL Server, and infrastructure optimization.
Much of his recent experience has involved the automation, usually with PowerShell, of administrative tasks, including a client service portal for cloud-based services, AD management, and infrastructure creation.
Microsoft has recognized his technical expertise and community activities by presenting him the Microsoft MVP award over multiple years. Richard is a frequent speaker at conferences in the UK, continental Europe, and the United States. Richard has several books to his credit, covering the PowerShell language, using PowerShell to administer Windows systems, Windows Management Instrumentation (WMI), and AD.
18.191.202.72