Cover Page





Mastering Windows Server®

2016 Hyper- V®



John Savill











Wiley Logo





For my wife, Julie, and my children,
Abby, Ben, and Kevin. My everythings.

Acknowledgments

I could not have written this book without the help and support of many people. First I need to thank my wife, Julie, for putting up with me for being busier than usual the last six months and for picking up the slack as always—and for always supporting the crazy things I want to do. My children, Abby, Ben, and Kevin, always make all the work worthwhile; they can turn the worst, most tiring day into a good one with a smile and a laugh.

Of course, the book wouldn’t be possible at all without the Wiley team: senior acquisitions editor Kenyon Brown, development editor Gary Schwartz, production editor Christine O’Connor, copy editor Sharon Wilkey, and proofreader Nancy Carrasco.

Many people have helped me over the years with encouragement and technical knowledge, and this book is the sum of that. The following people helped out on specific aspects of this book, and I want to thank them and give them the credit they deserve for helping make this book as good as possible (if I’ve missed anyone, I’m truly sorry): Theo Thompson, Mathew John, Jake Oshins, Chris Huybregts, Neil Peterson, Jim Wooldridge, Steven Ekren, Michael Gray, Darren Moss, Claus Joergensen, Dean Wells, Nir Ben Zvi, Andrew Mason, Jian Yan, Simon Gurevich, Shivam Garg, Elden Christensen, Jason Messer, Taylor Brown, Manish Jha, Shon Shah, Pradeep Reddy, Don Stanwyck, Greg Cusanza, Paul Kimbel, Scott Willwerth, and Tim Aranki.

About the Author

John Savill is a technical specialist who focuses on Microsoft core infrastructure technologies including Windows, Hyper‐V, System Center, and anything that does something cool. He has been working with Microsoft technologies for 20 years. He is the creator of the highly popular NTFAQ.com website and a senior contributing editor for Windows IT Pro magazine. He has written seven previous books covering Windows, Azure, Hyper‐V, and advanced Active Directory architecture. When he is not writing books, he writes magazine articles and white papers; creates many technology videos, which are available on his YouTube channel, www.youtube.com/ntfaqguy; and presents online and at industry‐leading events, including TechEd, Ignite, and Windows Connections. When he was writing this book, he had just completed running his annual series of Master Classes, which include classes on Azure, Hyper‐V, PowerShell, and the complete Microsoft stack. John also has online courses on Pluralsight and O’Reilly.

Outside technology, John enjoys cardio and weight training. In fact, while writing this book, he was training for his third full Ironman triathlon in Chattanooga, Tennessee.

John tries to update his blog at www.savilltech.com/blog with the latest news of what he is working on and also tweets at @NTFAQGuy.

Introduction

The book you are holding is the result of 20 years of experience in the IT world and over 15 years of virtualization experience that started with VMware and includes Virtual PC and now Hyper‐V. My goal for this book is simple: to help you become knowledgeable and effective when it comes to architecting and managing a Hyper‐V‐based virtual environment. This means not only understanding how Hyper‐V works and its capabilities, but also knowing when to leverage other technologies to provide the most complete and optimal solution. That means leveraging System Center and Microsoft Azure, which I also cover because they relate to Hyper‐V. I also dive into some key technologies of Windows Server that bring benefits to Hyper‐V.

Hyper‐V is now a mature and widely adopted virtualization solution. It is one of only two x86 server virtualization solutions in Gartner’s leader quadrant. In addition to being used by many of the largest companies in the world, Hyper‐V powers Microsoft Azure, which is one of the largest cloud services in the world.

Hyper‐V is a role of Windows Server. If you are a Windows administrator, you will find Hyper‐V management fairly intuitive, but there are still many key areas that require attention. I have structured this book to cover the key principles of virtualization and the resources that you will manage with Hyper‐V before I cover installing and configuring Hyper‐V itself and then move on to advanced topics such as high availability, replication, private cloud, and more.

I am a strong believer in learning by doing, and therefore I highly encourage you to try out all of the technologies and principles I cover in this book. You don’t need a huge lab environment. For most topics, you could use a single machine with Windows Server installed and 8GB of memory to enable a few virtual machines to run concurrently. Ideally, though, having at least two servers will help with the replication and high‐availability concepts. In this book, sometimes you’ll see step‐by‐step instructions to guide you through a process, sometimes I link to an external source that already has a good step‐by‐step guide, and sometimes I link to videos that I have posted to ensure maximum understanding. With Windows 10, Hyper‐V is included in the box, so even without any kind of server, it is possible to explore many of the Hyper‐V technologies.

I have created an application that is available for various platforms: Mastering Hyper‐V 2016. It provides easy access to the external links, videos, and code samples that I use in this book. As you read each chapter, check out the application to find related content. The application can be downloaded from www.savilltech.com/mhv. Using the various platform stores also allows me to update it over time as required. Please get this application, as I will use it to add videos based on reader feedback that are not referenced in the main text and include additional information where required.

Who Should Read This Book

I am making certain assumptions regarding the reader:

This book is intended for anyone who wants to learn Hyper‐V. If you have a basic knowledge of virtualization or a competing technology, such as VMware, that will help, but it is not a requirement. I start off with a foundational understanding of each technology and then build on that to cover more‐advanced topics and configurations. If you are an architect, a consultant, an administrator, or really anyone who just wants better knowledge of Hyper‐V, this book is for you.

At times I go into advanced topics that may seem over your head. In those cases, don’t worry. Focus on the preceding elements that you understand, and implement and test them to solidify your understanding. Then, when you feel comfortable, come back to the more advanced topics. They will seem far simpler once your understanding of the foundational principles is solidified.

What’s Inside

Here is a glance at what’s in each chapter:

Chapter 1: Introduction to Virtualization and Microsoft Solutions This chapter focuses on the core value proposition of virtualization and how the datacenter has evolved. It covers the key changes and capabilities of Hyper‐V in addition to the role System Center plays in a Hyper‐V environment. I cover the types of cloud services available and how Hyper‐V forms the foundation of private cloud solutions.

Chapter 2: Virtual Machine Resource Fundamentals This chapter covers the core resources of a virtual machine, specifically architecture (generation 1 and generation 2 virtual machines), processor, and memory. You will learn about advanced configurations to enable many types of operating system support along with best practices for resource planning.

Chapter 3: Virtual Networking This chapter covers one of the most complicated aspects of virtualization, especially when using the new network virtualization capabilities in Hyper‐V. This chapter covers the key networking concepts, how to architect virtual networks, and how to configure them. I also cover networking using System Center Virtual Machine Manager (SCVMM) and how to design and implement network virtualization v2 that is introduced in Windows Server 2016.

Chapter 4: Storage Configurations This chapter covers the storage options for Hyper‐V environments, including the VHD and VHDX formats, plus capabilities in Windows Server 2016 that help manage direct attached storage, including Storage Spaces Direct and Storage Replica. You will learn about storage technologies for virtual machines such as iSCSI, Virtual Fibre Channel, and shared VHDX; their relative advantages; as well as the storage migration and resize functions.

Chapter 5: Managing Hyper‐V This chapter walks you through the installation of and best practices for managing Hyper‐V. The basics of configuring virtual machines, installing operating systems, and using the Hyper‐V Integration Services are all covered. Strategies for migrating from other hypervisors, physical servers, and other versions of Hyper‐V are explored.

Chapter 6: Maintaining a Hyper‐V Environment This chapter focuses on the tasks required to keep Hyper‐V healthy after you’ve installed it, which includes patching, malware protection, backup, and monitoring. Key actions, such as taking checkpoints of virtual machines, setting up service templates, and performance tuning are covered.

Chapter 7: Failover Clustering and Migration Technologies This chapter covers making Hyper‐V highly available by using Failover Clustering, and it includes a deep dive into exactly what makes a cluster tick, specifically when running Hyper‐V. Key migration technologies such as Live Migration, Shared Nothing Live Migration, and Storage Migration are explored in addition to configurations related to mobility outside a cluster and placement optimization for virtual machines.

Chapter 8: Hyper‐V Replica and Cloud Orchestration This chapter shifts from high availability to a requirement of many organizations today: providing disaster‐recovery protection in the event of losing an entire site. This chapter looks at the options for disaster recovery, including leveraging Hyper‐V Replica, orchestrating failovers with Microsoft Azure in the event of a disaster, and using Azure as the DR target location.

Chapter 9: Implementing the Private Cloud, SCVMM, and Microsoft Azure Stack This chapter shows the many benefits of the Microsoft stack to organizations, beyond just virtualization. This chapter explores the key benefits of a private cloud and describes what a private cloud using Microsoft technologies looks like. Key components and functional areas, including the actual end‐user experience and how you can leverage all of System Center for different levels of private cloud capability, are all covered. The Microsoft Azure Stack solution is introduced and its key capabilities explored.

Chapter 10: Containers and Docker This chapter focuses on the new Windows and Hyper‐V container technologies available in Windows Server 2016. This chapter dives into the architectural components and management with Docker.

Chapter 11: Remote Desktop Services This chapter shifts the focus to another type of virtualization, virtualizing the end‐user experience, which is a critical capability for most organizations. Virtual desktop infrastructure is becoming a bigger component of the user environment. This chapter looks at the types of desktop virtualization available with Remote Desktop Services, with a focus on capabilities that are enabled by Hyper‐V, such as advanced graphical capabilities with RemoteFX.

Chapter 12: Microsoft Azure IaaS, Storage, and Networking This chapter explores the capabilities of one of the biggest public cloud services in the world, which is powered by Hyper‐V. This chapter covers the fundamentals of Microsoft Azure and how to create virtual machines in Microsoft Azure. The chapter also covers the networking options available both within Microsoft Azure and to connect to your on‐premises network. I examine the migration of virtual machines and how to leverage Azure Storage. Ways to provide a seamless management experience are also explored.

Chapter 13: Bringing It All Together with a Best‐of‐Breed Cloud Solution This chapter brings together all of the technologies and options to help architect a best‐of‐breed virtualization and cloud solution.

Don’t forget to download the companion Windows Store application, Mastering Hyper‐V, from www.savilltech.com/mhv.

The Mastering Series

The Mastering series from Sybex provides outstanding instruction for readers with intermediate and advanced skills in the form of top‐notch training and development for those already working in their field and clear, serious education for those aspiring to become pros. Every Mastering book includes the following elements:

How to Contact the Author

I welcome feedback from you about this book or about books you’d like to see from me in the future. You can reach me by writing to john@savilltech.com. For more information about my work, visit my website at www.savilltech.com and follow me on Twitter at @NTFAQGuy.

Sybex strives to keep you supplied with the latest tools and information that you need for your work. Please check the Sybex website at www.sybex.com/go/masteringhyperv2016, where we’ll post additional content and updates that supplement this book should the need arise.