ptg6432687 ptg6432687 Windows ® Server 2008 Hyper-V UNLEASHED 800 East 96th Street, Indianapolis, Indiana 46240 USA Rand Morimoto, Ph.D., MCSE, CISSP Jeff Guillet, MCITP, MCSE, CISSP Download at www.wowebook.com ptg6432687 Windows® Server 2008 Hyper-V Unleashed Copyright © 2009 by Sams Publishing All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein. ISBN-13: 978-0-672-33028-5 ISBN-10: 0-672-33028-8 Library of Congress Cataloging-in-Publication Data Morimoto, Rand. Windows server 2008 Hyper-V unleashed / Rand Morimoto, Jeff Guillet. p. cm. ISBN 978-0-672-33028-5 1. Microsoft Windows server Hyper-V. 2. Virtual computer systems. I. Guillet, Jeff. II. Title. QA76.9.V5M656 2008 005.4'476 dc22 2008031823 Printed in the United States of America First Printing: September 2008 Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possi- ble, but no warranty or fitness is implied. The information provided is on an “as is” basis. The authors and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book. Bulk Sales Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact U.S. Corporate and Government Sales 1-800-382-3419 corpsales@pearsontechgroup.com For sales outside of the U.S., please contact International Sales international@pearsoned.com Editor-in-Chief Karen Gettman Executive Editor Neil Rowe Development Editor Mark Renfrow Managing Editor Patrick Kanouse Project Editor Jennifer Gallant Copy Editor Keith Cline Indexer Brad Herriman Proofreader Water Crest Publishing, Inc. Technical Editor Scott Rose, MCSE Publishing Coordinator Cindy Teeters Book Designer Gary Adair Download at www.wowebook.com ptg6432687 Contents at a Glance Introduction . 1 Part I Windows 2008 Hyper-V Overview 1 Windows Server 2008 Hyper-V Technology Primer . 7 2 Best Practices at Planning, Prototyping, Migrating, and Deploying Win- dows Server 2008 Hyper-V 39 3 Planning, Sizing, and Architecting a Hyper-V Environment. 73 Part II Windows 2008 Hyper-V Host and Guest Installation 4 Installing Windows 2008 Server and the Hyper-V Role . 101 5 Installing a Guest Session on Hyper-V 129 Part III Administering and Maintaining Hyper-V Host Services 6 Managing, Administering, and Maintaining a Hyper-V Host Server. 151 7 Optimizing the Hyper-V Host Server and Guest Sessions 209 Part IV System Center Virtual Machine Manager 2008 in a Hyper-V Environment 8 System Center Virtual Machine Manager Technology Primer 253 9 Installing and Getting Familiar with Virtual Machine Manager 2008. 273 10 Creating Guest Images from Existing Production and Virtual Systems 301 11 Using Virtual Machine Manager 2008 for Provisioning . 321 Part V Maintaining Guest Session Uptime in a Hyper-V Environment 12 Application-Level Failover and Disaster Recovery in a Hyper-V Environment 349 13 Debugging and Problem Solving the Hyper-V Host and Guest Operating System . 385 Index . 429 Download at www.wowebook.com ptg6432687 Table of Contents Introduction 1 Part I Windows 2008 Hyper-V Overview 1 Windows Server 2008 Hyper-V Technology Primer 7 What Is Server Virtualization and Microsoft Hyper-V?. 7 Virtualization as an IT Organization Strategy . 8 Microsoft Hyper-V Server as a Role in Windows Server 2008. 8 Choosing to Virtualize Servers . 11 Virtualization for Test and Development Environments 11 Virtualization for Server Consolidation . 11 Virtualization as a Strategy for Disaster Recovery and High Availability. 12 Understanding Microsoft’s Virtualization Strategy. 13 Acquisition of Virtual PC . 13 Microsoft Virtual Server. 13 Virtual Server 2005 14 Virtual Server 2005 R2 14 Integration of Hypervisor Technology in Windows Server 2008 15 What’s New in Hyper-V. 15 New Features That Provide Better Virtual Host Capabilities. 16 New Features That Provide Better Administration Support. 16 New Features That Provide Better Guest Support 17 New Features That Provide Better Reliability Capabilities. 18 Determining What Is Needed to Virtualize Servers 19 Versions of Windows Server 2008 That Host Hyper-V . 19 Versions of Guest Sessions Supported Under Hyper-V . 23 Guest Session Integration Support Tools. 27 The Right Time to Implement Hyper-V 27 Adding a Hyper-V Host Server in an Existing Active Directory 2000/2003 Environment 28 Waiting to Fully Implement Windows 2008 in the Environment 29 Migrating from Microsoft Virtual Server 2005 and VMware . 29 Mounting Existing Virtual Guest Images on Hyper-V. 29 Performing a Virtual to Virtual Migration of Guest Images . 30 Using VMM to Manage VMware Virtual Infrastructure 3 30 Download at www.wowebook.com ptg6432687 Understanding the Administration of Virtual Guest Sessions . 31 Management Using the Hyper-V Administration Tool. 31 Management Using the Virtual Machine Manager 2008 Tool . 32 Management Using Thin Client Terminal Services . 32 Ensuring High Availability of a Hyper-V Host Server . 35 No Single Point of Failure in Clustering . 35 Stretched Clusters for Hyper-V Hosts and Guests Across Sites . 36 Leveraging Storage Area Networks for Virtual Hosts and Guests 36 Summary 37 Best Practices 37 2 Best Practices at Planning, Prototyping, Migrating, and Deploying Windows Server 2008 Hyper-V 39 Determining the Scope of Your Project 40 Identifying the Business Goals and Objectives to Implement Hyper-V Virtualization . 40 High-Level Business Goals 41 Business Unit or Departmental Goals 42 Identifying the Technical Goals and Objectives to Implement Hyper-V 43 Defining the Scope of the Work . 43 Determining the Time Frame for Implementation or Migration 45 Defining the Participants of the Design and Deployment Teams. 47 The Discovery Phase: Understanding the Existing Environment. 49 Understanding the Geographical Depth and Breadth 50 Managing Information Overload. 52 Assessing Applications for Resource Requirements. 52 The Design Phase: Documenting the Vision and the Plan 53 Collaboration Sessions: Making the Design Decisions . 53 Organizing Information for a Structured Design Document 54 Windows Server 2008 Hyper-V Design Decisions . 56 Agreeing on the Design 56 The Migration Planning Phase: Documenting the Process for Migration . 57 Time for the Project Plan . 57 Speed Versus Risk . 58 Creating the Migration Document . 59 The Prototype Phase: Creating and Testing the Plan. 63 How Do You Build the Lab? . 63 Results of the Lab Testing Environment . 64 The Pilot Phase: Validating the Plan on an Initial Set of Servers . 65 The First Server in the Pilot. 66 Rolling Out the Pilot Phase . 66 Contents v Download at www.wowebook.com ptg6432687 Fixing Problems in the Pilot Phase . 67 Documenting the Results of the Pilot 67 The Migration/Implementation Phase: Conducting the Migration or Installation 68 Verifying End-User Satisfaction 68 Supporting the New Virtualized Environment 68 Summary 68 Best Practices 69 The Discovery Phase . 70 The Design Phase . 70 The Migration Planning Phase 71 The Prototype Phase . 71 The Pilot Phase 71 The Migration/Implementation Phase 71 3 Planning, Sizing, and Architecting a Hyper-V Environment 73 Logically Distributing Virtual Servers on Specific Host Systems . 73 Distributing Virtual Servers Based on Workload . 73 Distributing Virtual Servers Based on Redundancy . 75 Distributing Virtual Servers Based on Server Interrelationships . 76 Distributing Virtual Servers Based on User Connectivity . 76 Distributing Virtual Servers Across a WAN Connection . 77 Choosing Servers to Virtualize. 78 Prioritizing Servers to Virtualize . 78 Candidates for Immediate Virtualization to Guest Sessions. 78 Secondary Candidates for Virtualization to Guest Sessions . 79 Servers That Need to Be Evaluated for Candidacy for Virtualization 81 Capturing the Workload Demands of Existing Servers 82 Introducing the Microsoft Virtualization Solution Accelerator. 82 Prerequisites for Installing the Microsoft VSA Tool . 82 Installing the Microsoft VSA Tool 83 Setting Up the Microsoft VSA Tool to Capture Data for the First Time 84 Choosing the Right Time Sequence to Capture Data 88 Preparing a Server Consolidation Recommendation Report 89 Analyzing the Workload Demands of Existing Servers 90 Identify Servers That Are and Are Not Virtualization Candidates 92 Combining Virtual Server Workloads to Create Optimized Host Servers. 92 Windows® Server 2008 Hyper-V Unleashed vi Download at www.wowebook.com ptg6432687 Choosing the Hyper-V Host System Environment. 92 Hyper-V on a Dedicated Host Server . 93 Hyper-V on a Blade Among Other Physical Servers. 93 Sizing a Hyper-V Host System Without Existing Guest Data . 93 Sizing Your Windows Server 2008 Server to Support Virtualization 94 Running Other Services on the Hyper-V System 95 Planning for the Use of Snapshots on the Hyper-V System . 95 Summary 96 Best Practices 96 Part II Windows 2008 Hyper-V Host and Guest Installation 4 Installing Windows 2008 Server and the Hyper-V Role 101 Planning and Preparing a Server Installation . 101 Verifying Minimum Hardware Requirements . 102 Choosing the Appropriate Windows Edition . 102 Choosing a New Installation or an Upgrade 103 Full Version of Windows or Server Core Installation . 103 Member Server or Standalone Server 104 Gathering the Information Necessary to Proceed. 104 Backing Up Files . 106 Installing a Clean Version of Windows Server 2008 Operating System 107 1. Customizing the Language, Time, Currency, and Keyboard Prefer- ences . 107 2. The Install Now Page . 108 3. Entering the Product Key. 108 4. Selecting the Type of Operating System to Install . 108 5. Accepting the Terms of the Windows Server 2008 License . 109 6. Selecting the Type of Windows Server 2008 Installation 109 7. Selecting the Location for the Installation . 109 8. Finalizing the Installation and Customizing the Configuration . 111 Installing the Hyper-V Server Role 115 Running Server Manager to Add the Hyper-V Role 116 Understanding Server Core Installation . 118 Performing a Server Core Installation . 118 Performing Common Server Tasks with Server Core . 120 Launching the Command Prompt in a Server Core Installation 121 Changing the Server Core Administrator’s Password . 121 Changing the Server Core Machine Name. 121 Contents vii Download at www.wowebook.com ptg6432687 Assigning a Static IPV4 IP Address and DNS Settings. 121 Adding the Server Core System to a Domain . 123 Enabling Remote Management and Remote Desktop to Server Core . 123 Rebooting and Shutting Down a Server Core System . 123 Installing Hyper-V Server Role on a Server Core System 123 Server Core Roles and Feature Installations 124 Summary . 126 Best Practices . 126 5 Installing a Guest Session on Hyper-V 129 Choosing the Guest Session Operating System . 129 Installing a Windows-Based Guest Operating System Session 130 Gathering the Components Needed for a Windows-Based Guest Session. 130 Beginning the Installation of the Windows-Based Guest Session 131 Completing the Installation of the Windows-Based Guest Session. 134 Installing a Linux-Based Guest Operating System Session 135 Gathering the Components Needed for a Linux-Based Guest Session. 135 Beginning the Installation of the Linux-Based Guest Session . 136 Completing the Installation of the Linux-Based Guest Session (x86) 137 Completing the Installation of the Linux-Based Guest Session (x64) 138 Modifying Guest Session Configuration Settings . 139 Adding or Limiting the RAM of the Guest Session . 139 Changing Network Settings for the Guest Session. 140 Mounting a Physical CD/DVD Image or Mounting a CD/DVD Image File. 140 Other Settings to Modify for a Guest Session Configuration . 141 Launching a Hyper-V Guest Session. 141 Automatically Launching a Guest Session . 141 Manually Launching a Guest Session . 143 Save State of a Guest Session 143 Installing the Windows Guest Session Integration Tools. 143 Installing the Windows Integration Tools . 144 Using Snapshots of Guest Operating System Sessions 145 Snapshots for Image Rollback . 145 Snapshots for Guest Session Server Fault Tolerance 145 Windows® Server 2008 Hyper-V Unleashed viii Download at www.wowebook.com ptg6432687 Creating a Snapshot of a Guest Image . 146 Rolling Back a Guest Image to a Previous Snapshot Image 146 Reverting a Snapshot Session . 147 Summary . 147 Best Practices . 147 Part III Administering and Maintaining Hyper-V Host Services 6 Managing, Administering, and Maintaining a Hyper-V Host Server 151 Becoming Familiar with the Hyper-V Administration Console. 152 Launching the Hyper-V Administration Console. 152 Using the Server Manager Tool to Manage Hyper-V Systems . 152 Using the Hyper-V MMC Tool to Manage Hyper-V Systems . 153 Connecting to a Different Virtual Server System . 154 Managing Windows Server 2008 Remotely . 155 Remote Server Administration Tools 155 Remote Desktop . 159 Windows Remote Management . 162 Managing Host Server, Virtual Switch, and Disk Settings 163 Configuring Host Server Settings 163 Stopping the Hyper-V Service . 165 Managing Virtual Network Segments with the Virtual Switch. 165 Modifying Disk Settings and Configurations . 167 Inspect Disk. 168 Using Common Practices for Securing and Managing a Hyper-V Host Server 168 Identifying Security Risks 168 Using System Center Operations Manager 2007 to Simplify Management 169 Leveraging Windows Server 2008 Maintenance Practices . 170 Specific Security Practices for Hyper-V Host Servers 170 Keeping Up with Service Packs and Updates. 172 Manual Update or CD-ROM Update 172 Automatic Updates . 174 Windows Server Update Services 176 Offline Virtual Machine Servicing Tool. 177 Backing Up the Hyper-V Host and Guests 178 Installing Windows Server Backup . 179 Scheduling a Backup Using Windows Server Backup and Allocating Disks 182 Running a Manual Backup to a Remote Server Share . 184 Contents ix Download at www.wowebook.com . Hyper -V Server as a Role in Windows Server 2008. 8 Choosing to Virtualize Servers . 11 Virtualization for Test and Development Environments 11 Virtualization for Server Consolidation . 11 Virtualization. Existing Production and Virtual Systems 3 01 11 Using Virtual Machine Manager 2008 for Provisioning . 3 21 Part V Maintaining Guest Session Uptime in a Hyper -V Environment 12 Application-Level Failover. of Contents Introduction 1 Part I Windows 2008 Hyper -V Overview 1 Windows Server 2008 Hyper -V Technology Primer 7 What Is Server Virtualization and Microsoft Hyper -V? . 7 Virtualization as an IT