Untitled
Total Page:16
File Type:pdf, Size:1020Kb
01_109175 ffirs.qxp 3/5/07 10:20 PM Page iii Professional Microsoft® Virtual Server 2005 Ben Armstrong 01_109175 ffirs.qxp 3/5/07 10:20 PM Page ii 01_109175 ffirs.qxp 3/5/07 10:20 PM Page i Professional Microsoft® Virtual Server 2005 01_109175 ffirs.qxp 3/5/07 10:20 PM Page ii 01_109175 ffirs.qxp 3/5/07 10:20 PM Page iii Professional Microsoft® Virtual Server 2005 Ben Armstrong 01_109175 ffirs.qxp 3/5/07 10:20 PM Page iv Professional Microsoft® Virtual Server 2005 Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2007 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada Library of Congress Control Number: 2007006575 ISBN: 978-0-470-10917-5 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 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 permis- sion 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 Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at 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 HERE- FROM. THE FACT THAT AN ORGANIZATION OR WEBSITE 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 WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAP- PEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress 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. Microsoft is a registered trade- mark of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. 01_109175 ffirs.qxp 3/5/07 10:20 PM Page v About the Author Ben Armstrong hails from Brisbane, Australia. He relocated to California in 2001 to start working on virtualization software being developed by Connectix Corporation. When Microsoft acquired the Connectix technology in 2003, he worked as a Program Manager on Microsoft’s new virtualization team. Ben has been working with virtualization for over five years and has been involved in the release of five major virtualization products (from both Connectix and Microsoft). In his spare time, Ben messes around with virtual machines, plays computer games, messes around playing computer games in virtual machines, and apparently writes books. Ben maintains a blog as Virtual PC Guy at http://blogs.msdn.com/virtual_pc_guy. 01_109175 ffirs.qxp 3/5/07 10:20 PM Page vi 01_109175 ffirs.qxp 3/5/07 10:20 PM Page vii Credits Executive Editor Vice President and Executive Group Publisher Chris Webb Richard Swadley Development Editor Vice President and Executive Publisher Ami Frank Sullivan Joseph B. Wikert Technical Editor Graphics and Production Specialists Steve Jain Denny Hager Rashell Smith Production Editor Alicia B. South Kathryn Duggan Quality Control Technician Copy Editor John Greenough Nancy Rapoport Project Coordinator Editorial Manager Lynsey Osborn Mary Beth Wakefield Proofreading and Indexing Production Manager Aptara Tim Tate Anniversary Logo Design Richard Pacifico 01_109175 ffirs.qxp 3/5/07 10:20 PM Page viii 01_109175 ffirs.qxp 3/5/07 10:20 PM Page ix Acknowledgments I give my love and appreciation to my wife, Werona, and my children, Isaac and Elizabeth, for their patience and support while I worked on this book. I would also like to thank my father, Joe, for putting up with late-night calls from me to complain about minor technical details. 01_109175 ffirs.qxp 3/5/07 10:20 PM Page x 02_109175 ftoc.qxp 3/5/07 10:21 PM Page xi Contents Acknowledgments ix Introduction xxi Part I: Getting Started with Virtual Servers 1 Chapter 1: Why Virtualize? 3 Benefits of Virtualization 3 Increased Hardware Utilization 3 System Isolation 4 Rapid Provisioning 4 System Flexibility 4 High Availability 5 Drawbacks of Virtualization 5 Performance 5 Scalability 6 Hardware Abstraction 6 Common Uses for Virtualization 7 Server Consolidation 7 Development and Testing 7 Server Resiliency 8 Dealing with Legacy Applications 8 Training 9 Demonstration 9 Web-Based Systems 10 Conclusion 10 Chapter 2: Getting Started with Microsoft Virtual Server 2005 11 Configuring the Host Environment 12 Configuring IIS on Windows Server 2003 13 Configuring IIS on Windows XP Professional 13 Configuring IIS on Windows Vista 13 Configuring IIS on Windows Codenamed Longhorn Server 14 Installing Virtual Server 14 Website Configuration 15 Firewall Configuration 15 02_109175 ftoc.qxp 3/5/07 10:21 PM Page xii Contents Advanced Installation Options 16 Custom Installation 16 MSI-Based Installation 16 Command Line–Based Installation 17 Creating the First Virtual Machine 17 Starting the First Virtual Machine 19 Conclusion 20 Chapter 3: Virtual Server Basic Concepts 21 Emulated Devices 21 Storage 22 Networking 29 How Virtual Networks Work 31 Video 32 COM and LPT Ports 32 BIOS 32 Virtual Machine Additions 33 Advanced Performance Improvements Provided by Virtual Machine Additions 33 Conclusion 33 Chapter 4: Installing Guest Operating Systems 35 Using the Virtual Machine Remote Control Client 35 Installing Windows Server 2003 36 Installing Virtual Machine Additions for Windows 40 Installing Red Hat Enterprise Linux 4 41 Installing Virtual Machine Additions for Linux 44 Configuring Linux After Installation 46 Conclusion 47 Part II: Optimizing Virtual Machine Management and Usage 49 Chapter 5: Creating a Virtual Machine Library 51 Different Types of Libraries 51 Casual Virtual Machine Library 51 Formal Virtual Machine Library 52 Centralized Virtual Machine Library 52 Automated Virtual Machine Library 53 Differencing Disks versus Full Copies 54 Determining What Should Be in Your Base Virtual Machines 54 xii 02_109175 ftoc.qxp 3/5/07 10:21 PM Page xiii Contents Base Image Preparation 55 Windows Base Virtual Machines 55 Useful Post-Deployment Commands 71 Linux Base Virtual Machines 72 Storing Virtual Hard Disks on the Network 74 Conclusion 75 Chapter 6: Understanding Virtual Machine Performance 77 32-Bit versus 64-Bit Host Operating Systems 77 Hardware Virtualization 78 Networking 81 Network Performance Recommendations 87 Internal Networking 88 Storage 88 Storage Performance Recommendations 92 Keeping an Eye on Fragmentation 93 Other Devices 93 Configuring Memory 94 Selecting the Right Amount of Memory 94 Understanding the Impact of Non-Uniform Memory Architecture 95 Configuring Resource Allocations 97 Finding the Best Candidates for Virtualization 98 Conclusion 99 Part III: Maintaining Virtual Machines 101 Chapter 7: Monitoring and Managing Virtual Machines 103 Virtual Server Web Interface 103 Virtual Server Scripts 105 Windows Event Log 106 Performance Monitor 107 Microsoft Operations Manager 2005 108 Virtual Server Tasks 109 Virtual Server Health Information 110 Virtual Machine Diagram 111 Virtual Machine Performance Monitoring 111 Virtualization Reports 111 System Center Virtual Machine Manager 112 Conclusion 113 xiii 02_109175 ftoc.qxp 3/5/07 10:21 PM Page xiv Contents Chapter 8: Keeping Virtual Machines Up-to-Date 115 Don’t Update 115 Manual Updating 116 Automated Updating 116 Using a Windows Server Update Server 117 Installing Windows Server Update Server 2.0 118 Configuring Windows Server Update Server 2.0 119 Using a Linux YUM Server 137 Handling Base Virtual Machines 144 Conclusion 144 Part IV: Security and Backup for Virtual Machines 145 Chapter 9: Keeping Virtual Machines Secure 147 Antivirus for Virtual Machines 147 Network Security for Virtual Machines 148 Virtual Machine Firewall