No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2013958305
TRADEMARKS: Wiley and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Hyper-V and Windows Azure are trademarks or registered trademarks of Microsoft Corporation. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
Dear Reader,
Thank you for choosing Mastering Hyper-V 2012 R2 with System Center and Windows Azure. This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching.
Sybex was founded in 1976. More than 30 years later, we're still committed to producing consistently exceptional books. With each of our titles, we're working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best books available.
I hope you see all that reflected in these pages. I'd be very interested to hear your comments and get your feedback on how we're doing. Feel free to let me know what you think about this or any other Sybex book by sending me an email at contactus@wiley.com. If you think you've found a technical error in this book, please visit http://sybex.custhelp.com. Customer feedback is critical to our efforts at Sybex.
Best regards, Chris Webb Associate Publisher, Sybex
For my wife, Julie, and my children, Kevin, Abby, and Ben. 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 the last six months being busier than usual and for picking up the slack as always—and for always supporting the crazy things I want to do. My children, Kevin, Abby, and Ben, always make all the work worthwhile and can turn the worst, most tiring day into a good one with a smile and a laugh. Thanks to my parents for raising me to have the mindset and work ethic that enables me to accomplish the many things I do while maintaining some sense of humor.
Of course the book wouldn't be possible at all without the Wiley team: Mariann Barsolo, the acquisitions editor; the developmental editor, Kim Beaudet; the production editor, Rebecca Anderson; the copyeditors, Judy Flynn and Kim Wimpsett; and the proofreader, Rebecca Rider. Thanks also to my technical editor and friend, Sean Deuby.
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 with 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 (and if I've missed anyone, I'm truly sorry): Aashish Ramdas, Ben Armstrong, Charley Wen, Corey Sanders, Don Stanwyck, Elden Christensen, Gabriel Silva, Gavriella Schuster, Jake Oshins, Jeff Woolsey, John Howard, Jose Barreto, Kevin Holman, Kevin Saye, Matt McSpirit, Michael Gray, Michael Leworthy, Mike Schutz, Patrick Lang, Paul Kimbel, Scott Willwerth, Stephen Stair, Steve Linehan, Steven Ekren, and Vijay Tandra Sistla.
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 and is the creator of the highly popular NTFAQ.com website and a senior contributing editor for Windows IT Pro magazine. He has written five previous books covering Windows and advanced Active Directory architecture. When he is not writing books, he regularly writes magazine articles and white papers; creates a large number of technology videos, which are available on his YouTube channel, http://www.youtube.com/ntfaqguy; and regularly presents online and at industry leading events, including TechEd and Windows Connections. When he was writing this book, he had just completed running his annual online John Savill Master Class, which was even bigger and more successful than last year, and he is busy creating a John Savill Hyper-V Master Class, which will include two days of in-depth Hyper-V goodness.
Outside of technology, John enjoys teaching and training in martial arts (including Krav Maga and Jiu-Jitsu), spending time with his family, and participating in any kind of event that involves running in mud, crawling under electrified barbed wire, running from zombies, and generally pushing limits. While writing this book, John was training for the January 2014 Walt Disney World Dopey Challenge, which consists of running a 5K on Thursday, a 10K on Friday, a half marathon on Saturday, and then a full marathon on Sunday. The logic behind the name is that you would have to be dopey to do it, but after completing the Goofy Challenge in 2013—which consisted of the half-marathon and marathon portions—it seemed silly not take it a step further with the new Dopey event that was unveiled for 2014. As John's friend and technical editor Sean says, he does it for the bling .
John tries to update his blog at www.savilltech.com/blog with the latest news of what he is working on.
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 understanding how Hyper-V works and its capabilities, but it also means knowing when to leverage other technologies to provide the most complete and optimal solution. That means leveraging System Center and Windows Azure, which I also cover because they relate to Hyper-V. I also dive into some key technologies of Windows Server where they bring benefit 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, and in addition to being used by many of the largest companies in the world, it powers Windows Azure, which is one of the largest cloud services in the world.
Hyper-V is a role of Windows Server, and 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 you will manage with Hyper-V before I actually 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 I therefore highly encourage you to try out all the technologies and principles I cover in this book. You don't need a huge lab environment, and for most of the topics, you could use a single machine with Windows Server installed on it and 8 GB 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. Sometimes in this book you'll see step-by-step instructions to guide you through a process, sometimes I will link to an external source that already has a good step-by-step guide, and sometimes I will link to videos I have posted to ensure maximum understanding.
I have created an application that is available in the Windows Store, Mastering Hyper-V. It provides easy access to the external links, videos, and code samples I use in this book. As you read each chapter check out the application to find related content. The application can be downloaded from http://www.savilltech.com/mhv. Using the Windows Store allows me to also update it over time as required. Please get this application as I will use it to add additional 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:
You have basic Windows Server knowledge and can install Windows Server.
You have basic knowledge of what PowerShell is.
You have access to a Hyper-V server to enable test implementation of the many covered technologies.
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 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.
There are many times I go into advanced topics that may seem over your head. In those cases, don't worry. Focus on the preceding elements 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 are solidified.
What's Inside
Here is a glance at what's in each chapter.
Chapter 1, “Introduction to Virtualization and Microsoft Solutions,” 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 will cover the types of cloud services available and how Hyper-V forms the foundation of private cloud solutions.
Chapter 2, “Virtual Machine Resource Fundamentals,” 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,” 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'll also cover networking using System Center Virtual Machine Manager (SCVMM) and how to design and implement network virtualization.
Chapter 4, “Storage Configurations,” covers the storage options for Hyper-V environments, including the VHD and VHDX formats plus capabilities in Windows Server 2012 R2 that help manage direct attached storage. You will learn about storage technologies for virtual machines such as iSCSI, Virtual Fibre Channel, and shared VHDX; their relative advantages; and also the storage migration and resize functions.
Chapter 5, “Managing Hyper-V,” walks 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,” 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,” covers making Hyper-V highly available using failover clustering and will include 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 of a cluster and placement optimization for virtual machines.
Chapter 8, “Hyper-V Replica and Cloud Orchestration,” 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 and orchestrating failovers with Windows Azure in the event of a disaster.
Chapter 9, “Implementing the Private Cloud and SCVMM,” shows the many benefits of the Microsoft stack to organizations beyond just virtualization. This chapter explores the key benefits and what a private cloud using Microsoft technologies actually 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.
Chapter 10, “Remote Desktop Services,” 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 different 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 11, “Windows Azure IaaS and Storage,” explores the capabilities of one of the biggest public cloud services in the world, which is powered by Hyper-V. This chapter will cover the fundamentals of Windows Azure and how to create virtual machines in Windows Azure. The chapter will also cover the networking options available both within Windows Azure and to connect to your on-premises network. I will examine the migration of virtual machines and how to leverage Windows Azure Storage. Ways to provide a seamless management experience will be explored.
Chapter 12, “Bringing It All Together with a Best-of-Breed Cloud Solution,” brings together all the different technologies and options to help architect a best-of-breed virtualization and cloud solution.
Chapter 13, “The Hyper-V Decoder Ring for the VMware Administrator,” focuses on converting skills for VMware to their Hyper-V equivalent. This chapter also focuses on migration approaches and ways to translate skills.
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:
Skill-based instruction, with chapters organized around real tasks rather than abstract concepts or subjects
Self-review test questions, so you can be certain you're equipped to do the job right
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.
Sybex strives to keep you supplied with the latest tools and information you need for your work. Please check the Sybex website at www.sybex.com/go/masteringhyperv2012r2, where we'll post additional content and updates that supplement this book should the need arise.