Syngress Virtualization With Microsoft Virtual Server 2005 Dec 2006 ISBN 1597491063 pdf

  Visit us at w w w . s y n g r e s s . c o m

  

Syngress is committed to publishing high-quality books for IT Professionals and

delivering those books in media and formats that fit the demands of our cus-

tomers. We are also committed to extending the utility of the book you purchase

via additional materials available from our Web site.

  SOLUTIONS WEB SITE

To register your book, visit www.syngress.com/solutions. Once registered, you can

access our solutions@syngress.com Web pages. There you will find an assortment

of value-added features such as free e-booklets related to the topic of this book,

URLs of related Web sites, FAQs from the book, corrections, and any updates from

the author(s).

  ULTIMATE CDs

Our Ultimate CD product line offers our readers budget-conscious compilations of

some of our best-selling backlist titles in Adobe PDF form. These CDs are the perfect way to extend your reference library on key topics pertaining to your area of exper- tise, including Cisco Engineering, Microsoft Windows System Administration,

CyberCrime Investigation, Open Source Security, and Firewall Configuration, to

name a few.

  DOWNLOADABLE E-BOOKS

For readers who can’t wait for hard copy, we offer most of our titles in download-

able Adobe PDF form. These e-books are often available weeks before hard copies

and are priced affordably.

  SYNGRESS OUTLET

Our outlet store at syngress.com features overstocked, out-of-print, or slightly hurt

books at significant savings.

  SITE LICENSING

Syngress has a well-established program for site licensing our e-books onto servers

in corporations, educational institutions, and large organizations. Contact us at

sales@syngress.com for more information.

  CUSTOM PUBLISHING

Many organizations welcome the ability to combine parts of multiple Syngress

books, as well as their own content, into a single volume for their own internal use.

  Contact us at sales@syngress.com for more information.

  Virtualization with ®

  Microsoft Virtual

Server 2005

  Technical Editor Rogier Dittner David Rule Jr. Ken Majors Matthijs ten Seldam

  

Syngress Publishing, Inc., the author(s), and any person or firm involved in the writing, editing, or produc-

tion (collectively “Makers”) of this book (“the Work”) do not guarantee or warrant the results to be obtained from the Work.

There is no guarantee of any kind, expressed or implied, regarding the Work or its contents.The Work is

sold AS IS and WITHOUT WARRANTY.You may have other legal rights, which vary from state to state. In no event will Makers be liable to you for damages, including any loss of profits, lost savings, or other

incidental or consequential damages arising out from the Work or its contents. Because some states do not

allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation

may not apply to you.

  

You should always use reasonable care, including backup and other appropriate precautions, when working

with computers, networks, data, and files. Syngress Media®, Syngress®, “Career Advancement Through Skill Enhancement®,” “Ask the Author

UPDATE®,” and “Hack Proofing®,” are registered trademarks of Syngress Publishing, Inc. “Syngress:The

Definition of a Serious Security Library” ™, “Mission Critical™,” and “The Only Way to Stop a Hacker is to Think Like One ™” are trademarks of Syngress Publishing, Inc. Brands and product names mentioned in this book are trademarks or service marks of their respective companies.

KEY SERIAL NUMBER

  001 HJIRTCV764 002 PO9873D5FG 003 829KM8NJH2 004 AMY FILL IN 005 CVPLQ6WQ23 006

  VBP965T5T5 007 HJJJ863WD3E 008 2987GVTWMK 009 629MP5SDJT 010

  IMWQ295T6T PUBLISHED BY Syngress Publishing, Inc. 800 Hingham Street Rockland, MA 02370 Virtualization with Microsoft® Virtual Server 2005

Copyright © 2006 by Syngress Publishing, Inc. All rights reserved. Printed in Canada. Except as permitted

under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any

form or by any means, or stored in a database or retrieval system, without the prior written permission of

the publisher, with the exception that the program listings may be entered, stored, and executed in a com-

puter system, but they may not be reproduced for publication. Printed in Canada 1 2 3 4 5 6 7 8 9 0

  ISBN: 1-59749-106-3 Publisher: Andrew Williams Page Layout and Art: Patricia Lupien Acquisitions Editor: Gary Byrne Copy Editor: Michelle Melani Technical Editor: Rogier Dittner Indexer: Richard Carlson Cover Designer: Michael Kavish Distributed by O’Reilly Media, Inc. in the United States and Canada.

  Acknowledgments

  Syngress would like to acknowledge the following people for their kindness and support in making this book possible. Syngress books are now distributed in the United States and Canada by O’Reilly Media, Inc.The enthusiasm and work ethic at O’Reilly are incredible, and we would like to thank everyone there for their time and efforts to bring Syngress books to market:Tim O’Reilly, Laura Baldwin, Mark Brokering, Mike Leonard, Donna Selenko, Bonnie Sheehan, Cindy Davis, Grant Kikkert, Opol Matsutaro, Steve Hazelwood, Mark Wilson, Rick Brown,Tim Hinton, Kyle Hart, Sara Winge, Peter Pardo, Leslie Crandell, Regina Aggio Wilkinson, Pascal Honscher, Preston Paull, Susan Thompson, Bruce Stewart, Laura Schmier, Sue Willing, Mark Jacobsen, Betsy Waliszewski, Kathryn Barrett, John Chodacki, Rob Bullington, Kerry Beck, Karen Montgomery, and Patrick Dirden. The incredibly hardworking team at Elsevier Science, including Jonathan Bunkell, Ian Seager, Duncan Enright, David Burton, Rosanna Ramacciotti, Robert Fairbrother, Miguel Sanchez, Klaus Beran, Emma Wyatt, Krista Leppiko, Marcel Koppes, Judy Chappell, Radek Janousek, Rosie Moss, David Lockley, Nicola Haden, Bill Kennedy, Martina Morris, Kai Wuerfl-Davidek, Christiane Leipersberger,Yvonne Grueneklee, Nadia Balavoine, and Chris Reinders for making certain that our vision remains worldwide in scope. David Buckland, Marie Chieng, Lucy Chong, Leslie Lim, Audrey Gan, Pang Ai Hua, Joseph Chan, June Lim, and Siti Zuraidah Ahmad of Pansing Distributors for the enthusiasm with which they receive our books. David Scott, Tricia Wilden, Marilla Burgess, Annette Scott, Andrew Swaffer, Stephen O’Donoghue, Bec Lowe, Mark Langley, and Anyo Geddes of Woodslane for distributing our books throughout Australia, New Zealand, Papua New Guinea, Fiji,Tonga, Solomon Islands, and the Cook Islands.

  Technical Editor and Lead Author Rogier Dittner (MCSE NT4, 2000, 2003, MCDBA, MCT, MSF

  Practitioner) is a consultant at a Microsoft partner offering solutions based on Microsoft technology to customers. As a consultant he supports the sales organization and takes part in planning and designing complex Microsoft-oriented implementations.

  Because of his personal interest in Microsoft products and more than 10 years’ experience, he has deep technical working knowledge in a broad range of Microsoft products. Within his company he per- forms the leading role in operations management solutions and training.

  He would like to thank his wife and children for giving him the time and space to write (Pascalle, bedankt, je bent een schat!).

  Contributing Authors Geoffrey Green (Citrix CCA, CCNA, HP ASE, MCSE, RSA

  CSE, VMware VCP) is a senior systems consultant with MTM Technologies, where he provides MTM clients in the Ohio Valley region with advanced infrastructure assessment, design, and imple- mentation solutions. As an information technology generalist, Geoff has developed a broad range of field experience in many areas, including Citrix Access Infrastructure; Cisco routing, switching, and firewalls; Virtual Infrastructure from both VMware and Microsoft; HP ProLiant server and storage technology; RSA SecurID tech- nology; and the whole range of Microsoft server technologies. He has provided integrated infrastructure solutions to clients for over 11 years.

  Geoff currently lives in Cincinnati, OH, with his wife, Colleen, and his two dogs,Trinity and Spock.

  Geoff wrote Chapter 9.

  Twan Grotenhuis (MCT, MCSE NT4, 2000 and 2003,

  MCSE+messaging 2000 and 2003, CCNA) is a consultant with Sylis Netherlands. He currently provides strategic and technical con- sulting to several of the Sylis customers in the Netherlands. His spe- cialties include Microsoft Exchange and ISA architecture, design, implementation, troubleshooting and optimization.Twan has been involved in several Virtual Server 2005 projects where virtualization of physical servers was his main focus.

  Twan wrote Chapter 8.

  Andy Jones (MCSE+I, MCT, CCIA, CCEA, CCI, CCNA,

  CCDA, MCIW, Network+, A+) is the Services Director for MTM Technologies, previously known as Vector ESP. He provides compre- hensive solutions focused on Citrix and Microsoft technologies for clients ranging from 50 to 50,000 users, focusing mainly on archi- tecting and deploying Access Infrastructure solutions for enterprise customers. One of Andy’s primary focuses is in developing best practices, processes, and methodologies surrounding Access Infrastructure that take into consideration and integrate with virtu- ally every part of a customer’s infrastructure.

  In addition to field work and business development, Andy regu- larly instructs Microsoft and Citrix courses. Andy holds a master’s degree from Morehead State University.

  Andy cowrote Chapter 6. I would like to thank my family, Amy, Julia, and Jocelyn, without your

patience and support my contribution would not have been possible. I would

also like to thank my fellow consultants who have helped in ways that

cannot be expressed. Finally, I would like to thank the editors for this project

for their assistance in helping me “refine” my work. I would like to dedicate

my contribution to this work to my brother Jeremy and my mother. I love you both and miss you dearly.

  

Kenneth Majors (MCSE, MCSA, Project+, VMware VCP, Citrix

  CCEA, CCA, IBM X-Series Expert, Avaya ACA) is a consultant for Choice Solutions LLC, a systems integrator headquartered in Overland Park, KS. Choice Solutions provides IT design, project management, and support for enterprise computing systems.

  Kenneth is a key contributor to defining best practices for deploy- ment and implementation of Microsoft technologies, including Windows Server, Virtual Server, and SharePoint; Citrix Presentation Server; VMware ESX; and development of documentation standards. He develops technology solutions and methodologies focused on improving client business processes.These technology solutions touch every part of a system’s life cycle from assessment, blueprint, construction, and deployment on projects to operational manage- ment and strategic planning for the business process.

  Kenneth holds a bachelor’s degree from Colorado Technical University. He currently resides in Olathe, KS, with his lovely, sup- portive wife, Sandy, and near their children,Tabitha and Keith, and their grandsons, Wesley and Austin.

  Kenneth wrote Chapters 3 and 4.

  

David Rule Jr. (VMware VCP, VAC, MCP, Citrix CCEA, CCA) is

  a Senior Consultant for Choice Solutions LLC, an Overland Park, KS-based systems integrator that provides IT design, project man- agement, and support for enterprise computing systems. David’s pri- mary role is in developing virtualization strategies for Choice Solutions’ clients.The strategies include the virtualization of both servers and storage, including the development of best practice and standards documentation.The combination of virtual servers and storage provides systems with enterprise-class stability, performance, and scalability.These technologies are implemented to provide clients with environments that facilitate management of and increase the performance of day-to-day operations while also making them more reliable and cost-effective.

  David is currently working toward completing a degree from Park University in Computer Information Systems Management. He resides in Shawnee, KS, with his wife, Kristine, and their two wonderful children, Christian and Collin.

  David wrote Chapters 1 and 2.

  Matthijs ten Seldam (MCSE, CISSP) is a principal consultant

  with the infrastructure technologies group at Microsoft Consulting Services. His expertise focuses on virtualization, platform manage- ment and deployment, security, and networking. One of his special- ties is automation of management tasks through various interfaces like WMI and COM using languages like VBScript and C#.

  He has developed technical training material on Virtual Server 2005 R2 and delivers this to customers and partners. He currently provides consulting to enterprise customers, delivers technical work- shops, and runs early adoption programs of the next generation of virtualization products like Virtual Server 2005 R2 Service Pack 1 and System Center Virtual Machine Manager.

  Matthijs wrote Chapters 5 and 7. He also contributed the scripts for Appendix C.

  Companion Web Site

  Some of the code presented throughout this book is available for download from www.syngress.com/solutions. Look for the Syngress icon in the margins indicating which examples are available from the companion Web site. and When Should You Use It? . . . . . . . . . . . . . . . . .3 Advantages of Virtualization . . . . . . . . . . . . . . . .3 Production Data Centers . . . . . . . . . . . . . . . .4 Test and Development Data Centers . . . . . . . .5 Disaster Recovery . . . . . . . . . . . . . . . . . . . . .6 What Virtualization Tools Are Available? . . . . . . . . . .7

  Third-Party Virtualization Tools . . . . . . . . . . . . .7 How Does Virtualization Work? . . . . . . . . . . . . . . .9 Virtual PC versus Virtual Server 2005 . . . . . . . . . .10 Features That Are Found in Both

  Virtual PC and Virtual Server 2005 R2 . . . . . . .10 Differences between Virtual PC and Virtual Server 2005 R2 . . . . . . . . . . . .11 Supported Features in Virtual PC . . . . . . . . .11

  Supported Features in Virtual Server 2005 R2 . . . . . . . . . . . . . . . .12 Scenarios for the Use of Virtual PC . . . . . . . . .13 Help Desk . . . . . . . . . . . . . . . . . . . . . . . . . .13

  Training . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 Legacy Applications . . . . . . . . . . . . . . . . . . .14 Virtual Server 2005 versus Virtual Server 2005 R2 14

  Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . .15 Frequently Asked Questions . . . . . . . . . . . . . . . . . .17

  Contents

Chapter 1 Introduction to Microsoft Virtual Server . . . . . . . . . . . . . . . . . . . 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 Microsoft Virtual Server 2005 R2 and Dynamics System Initiative . . . . . . . . . . . . . . . . . . . . . . . . . . .2 What Is Virtualization,

  xiv Contents

Chapter 2 Installing and Configuring a Virtual Server. . . . . . . . . . . . . . . 19 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 Determining the Physical Size of the Server . . . . . .20 Physical Server Sizing . . . . . . . . . . . . . . . . . . . .20 Evaluating Existing Physical Servers . . . . . . .21 Planning for New Virtual Servers . . . . . . . . .21 Installing Virtual Server 2005 R2 . . . . . . . . . . . . . .22 Preinstallation Tasks . . . . . . . . . . . . . . . . . . . . .22 Installation Tasks . . . . . . . . . . . . . . . . . . . . . . . .23 Setting Up a Virtual Server Administration Web Site . . . . . . . . . . . . . . . . . . . .28 Virtual Server Administration Web Site Installation . . . . . . . . . . . . . . . . . . . . .29 Installing in a Multiserver Environment . . . . .29 Virtual Machine Remote Console . . . . . . . . . . . . .35 Setting Access Permissions for

  the Virtual Machine Remote Console . . . . . . . .35 Setting Default Location and Search Paths . . . . . . .37 Setting Resource Allocation . . . . . . . . . . . . . . . . . .39 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . .42 Frequently Asked Questions . . . . . . . . . . . . . . . . . .44

  Contents xv

Chapter 3 Virtual Machines . . . . . . . . . . . . . . . 45 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 Creating the Virtual Server . . . . . . . . . . . . . . . . . .47 Using the Administration Web Page . . . . . . . . .49 Virtual Machine Configuration . . . . . . . . . . .53 Adding Hardware to the Server . . . . . . . . . . . . . . .75 Building the Host Server . . . . . . . . . . . . . . . . .75 Processors . . . . . . . . . . . . . . . . . . . . . . . . . .75 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . .76 Storage Systems . . . . . . . . . . . . . . . . . . . . . .76 Network Cards . . . . . . . . . . . . . . . . . . . . . . .77 COM an LPT Ports . . . . . . . . . . . . . . . . . . .77 USB Ports . . . . . . . . . . . . . . . . . . . . . . . . . .77 Installing a Windows OS . . . . . . . . . . . . . . . . . . . .78 Loading the Operating System . . . . . . . . . . . . .79 Booting from the Virtual Floppy Disk Drive 81 Starting the Virtual Machine . . . . . . . . . . . . .83 Installing the Operating System . . . . . . . . . . .87 Installing Virtual Machine Additions . . . . . . . . . . .89 Removing Virtual Machine Additions . . . . . . . .91 Installing a Non-Windows OS . . . . . . . . . . . . . . . .92 Creating the Virtual Machine . . . . . . . . . . . . . .93 Virtual Machine Additions for Linux . . . . . . . . .96 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . .106 Frequently Asked Questions . . . . . . . . . . . . . . . . .109

  xvi Contents

Chapter 4 Virtual Networks . . . . . . . . . . . . . . 111 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Introduction to Virtual Networks . . . . . . . . . . . . .112 Virtual Networks . . . . . . . . . . . . . . . . . . . . . .113 Viewing the Virtual Networks . . . . . . . . . .114 Using the “Internal Network” . . . . . . . . . . . . . . .122 Using the Loopback Adapter . . . . . . . . . . . . . .124 Installing the Loopback Adapter . . . . . . . . .124 Configuring Host-to-Guest Networking and File Sharing . . . . . . . . . . .128 Using the ICS . . . . . . . . . . . . . . . . . . . . . .133 Creating a Virtual Network . . . . . . . . . . . . . . . . .139 Binding a Physical Network Adapter to a Virtual Network . . . . . . . . . . . . . . .141 Changing the Binding of a Virtual Network . .142 Changing the Virtual Network for a Virtual Machine . . . . . . . . . . . .145 Using the Virtual Server Network Services . . . . . .147 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . .153 Frequently Asked Questions . . . . . . . . . . . . . . . . .155

  Contents xvii

Chapter 5 Virtual Disks. . . . . . . . . . . . . . . . . . 157 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . .158 Removable Virtual Disks . . . . . . . . . . . . . . . . . . .158 CD/DVD Drive . . . . . . . . . . . . . . . . . . . . . . .159 Floppy Disk Drive . . . . . . . . . . . . . . . . . . . . .161 Virtual Hard Disks . . . . . . . . . . . . . . . . . . . . . . .166 Dynamically Expanding Virtual Hard Disk . . .168 Compacting . . . . . . . . . . . . . . . . . . . . . . . .170 Converting . . . . . . . . . . . . . . . . . . . . . . . . .177 Fixed-Size Virtual Hard Disk . . . . . . . . . . . . .178 Converting . . . . . . . . . . . . . . . . . . . . . . . . .179 Differencing Virtual Hard Disk . . . . . . . . . . . .180 Chaining . . . . . . . . . . . . . . . . . . . . . . . . . .186 Merging . . . . . . . . . . . . . . . . . . . . . . . . . . .187 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . .192 Frequently Asked Questions . . . . . . . . . . . . . . . . .194

  xviii Contents

Chapter 6 Introduction to ADS and Virtual Server Migration Tool . . . . . . . . . 197 Automated Deployment Services . . . . . . . . . . . . .198 Rapid Deployment Using ADS . . . . . . . . . .198 What Components Does ADS Use? . . . . . . . . . . .200 ADS Controller Service . . . . . . . . . . . . . . .200 ADS Network Boot Service . . . . . . . . . . . .200 ADS Image Distribution Service . . . . . . . . .201 ADS Host Server Requirements . . . . . . . . . . .202 ADS Client-Server Requirements . . . . . . . . . .202 ADS Network and Management Requirements . . . . . . . . . . . . . .203 Installing ADS . . . . . . . . . . . . . . . . . . . . . . . . . . .204 Installation Options . . . . . . . . . . . . . . . . . . . .204 Installation Process . . . . . . . . . . . . . . . . . . . . .205 Post-Installation: Configuring ADS . . . . . . . . . . . .214 Automatically Accepting New Clients . . . . . . .214 Enabling Multicast . . . . . . . . . . . . . . . . . . . . .218 Administration Agent Installing . . . . . . . . . . . . . .219 Adding Hardware Drivers in the Boot OS . . . . . .223 Editing Using the Sequence Editor . . . . . . . . . . .223 Installing Virtual Server Migration Toolkit onto the Virtualization Server . .227 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . .231 Frequently Asked Questions . . . . . . . . . . . . . . . . .233

  Contents xix

Chapter 7 Managing Virtual Server . . . . . . . . 235 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 The Management Interface . . . . . . . . . . . . . . . . .236 Configuring a Central Virtual Server Management Site . . . . . . . . . . .237 Using the Virtual Server COM API . . . . . . . . . . .247 Using the Virtual Server Programmer’s Guide 248 Connecting to the Virtual Server COM Object . . . . . . . . . . . . . .254 Accessing a Virtual Server Using Script . . . . . . . .256 Listing Virtual Server Properties . . . . . . . . . . .256 Setting Virtual Server Properties . . . . . . . . . . .259 Creating a Virtual Machine Using Script . . . . . . .261 Creating a Virtual Hard Disk . . . . . . . . . . . . . .263 Putting It All Together . . . . . . . . . . . . . . . . . .264 Creating a Virtual Network Using Script . . . . . . .267 Retrieving Guest OS Information Using Script . .268 Changing a Virtual Machine State Using Script . .271 The Virtual Machine State Model . . . . . . . . . .272 Attaching Scripts to Virtual Server Events . . . . . .275 Attaching Scripts to Virtual Machine Events . .277 Scripts in Action . . . . . . . . . . . . . . . . . . . . . . .278 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . .283 Frequently Asked Questions . . . . . . . . . . . . . . . . .285

  xx Contents

Chapter 8 Migrating Physical Machines. . . . . 287 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . .288 Getting the Virtualization Environment Ready for Usage . . . . . . . . . . . . . . .288 Setting Up the Virtualization Tools . . . . . . . . .288 Installing VSMT and ADS Agent on the Virtual Server Host . . . . . . . . . .289 Creating the Virtual Network . . . . . . . . . . . . .292 Capturing the Physical Machine . . . . . . . . . . . . . .293 Hardware Inventory . . . . . . . . . . . . . . . . . . . .297 Creating the Scripts . . . . . . . . . . . . . . . . . . . .299 Validating Hardware . . . . . . . . . . . . . . . . . .299 Creating Migration Scripts . . . . . . . . . . . . .301 Data Capture . . . . . . . . . . . . . . . . . . . . . . . . .305 Creating the Virtual Machine on the Virtual Server Host . . . . . . . . . . .310 Deploying the Virtual Machine on the Host OS . .313 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . .316 Frequently Asked Questions . . . . . . . . . . . . . . . . .318

  Contents xxi

Chapter 9 Troubleshooting. . . . . . . . . . . . . . . 319 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . .320 Troubleshooting Virtual Server 2005 R2 . . . . . . .320 Troubleshooting Virtual Server Administration Web Site . . . . . . . . . . . .320 Troubleshooting LsaLogonUser() failed! . . . .320 Troubleshooting Internal Server Error 500 . .327 Troubleshooting Access Denied Errors . . . . .329 Troubleshooting VMRC Server Disabled Errors . . . . . . . . . . . . . . . .329 Troubleshooting Virtual Server Settings . . . . . .331 Troubleshooting Disappearing Server Settings . . . . . . . . . . . .331 Troubleshooting Virtual Network Changes 332 Troubleshooting Virtual Machine Performance Issues . . . . . . . . . . . . . .336 Disabling TCP Segmentation Offload . . . . .336 Don’t Use Network Adapter Auto-Configuration . . . . . . . . . . . .337 Use ISOs instead of CDs Whenever Possible . . . . . . . . . . . . . . .337 Don’t Overallocate Memory . . . . . . . . . . . .337 Use a Separate Disk Controller for Guest Machines . . . . . . . . . .338 Troubleshooting Automated Deployment Services 338 Troubleshooting PXE . . . . . . . . . . . . . . . . . . .338 Check the DHCP Configuration . . . . . . . .339 DHCP Relay Agent . . . . . . . . . . . . . . . . . .339 Check for Other PXE Servers . . . . . . . . . . .341 Check Your Network Drivers . . . . . . . . . . .341 Check Your Storage Drivers . . . . . . . . . . . .342 Check Your BIOS Clock . . . . . . . . . . . . . .342

  xxii Contents Troubleshooting the ADS Services . . . . . . . . . .342 Check That the ADS Services Are Running 342

  Confirm the ADS Controller’s IP Address . .343 Check the ADS Certificates . . . . . . . . . . . .343 Troubleshooting the Virtual Server Migration Tool 343 Troubleshooting the Virtual Network Setup . .344

  Troubleshooting Script Creation . . . . . . . . . . .344 Troubleshooting ADS Integration . . . . . . . . . .345 Troubleshooting Migration from VMware to Virtual Server . . . . . . . . . . . .345

  Troubleshooting the Migration Process . . . . . . . . .345 Imaging Problems . . . . . . . . . . . . . . . . . . . . . .346

  IDE Disks Cannot Exceed 127 GB . . . . . . . . .347 Converted SCSI Disks Fail to Boot . . . . . . . . .347 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351 Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . .351 Frequently Asked Questions . . . . . . . . . . . . . . . . .353

  Contents xxiii Appendix A The Pros and Cons of Running Virtual Server . . . . . . . . . . . . . . . . 355

  

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . .356

Why Is Virtual Server Beneficial? . . . . . . . . . .356

Performance Issues . . . . . . . . . . . . . . . . . . . . .357

Licensing Issues . . . . . . . . . . . . . . . . . . . . . . .358

Security Issues . . . . . . . . . . . . . . . . . . . . . . . .359

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359

  

About Brien M. Posey . . . . . . . . . . . . . . . . . . . .360

Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360

Appendix B Solutions Fast Track. . . . . . . . . . . 361

  

Chapter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362

Chapter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364 Chapter 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366 Chapter 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369 Chapter 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371 Chapter 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372 Chapter 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374 Chapter 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .376 Chapter 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378 Appendix C Windows Script Files for Virtual Server 2005 R2 . . . . . . . . . . . 381

Code Listings for Virtual Server 2005 R2 . . . . . . .382

Appendix D Integrating Non-Windows Systems with MOM 2005 Using Virtual Agents . . . . . . . . . . . . . . . . . . . . . . . . . 401 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

Chapter 1 Introduction to Microsoft Virtual Server Solutions in this chapter:

   Microsoft Virtual Server 2005 R2 and Dynamics System Initiative What Is Virtualization, and When Should You Use It? What Virtualization Tools Are Available? How Does Virtualization Work? Virtual PC versus Virtual Server 2005 Virtual Server 2005 versus Virtual Server

  2005 R2

  Summary Solutions Fast Track Frequently Asked Questions

  1

  2 Chapter 1 • Introduction to Microsoft Virtual Server Introduction

  In recent years the power of servers has grown immensely. In production, the servers perform well but the system is only partially utilized.This makes it fairly impossible to buy a server that is not overpowered.

  On the other side, there is the issue with hardware support on that old Windows server that you cannot migrate.These scenarios and a lot more are where virtualization can be a lot of help.There are several virtualization tools available on the market, all of them with specific support and features. We will review the most important ones, but our focus will be on the Microsoft vir- tualization tool Virtual Server 2005 R2.

  Microsoft Virtual Server 2005 R2 and Dynamics System Initiative

  The Microsoft Dynamics System Initiative (DSI) was created as a commit- ment between Microsoft and its partners to create more easily manageable systems that automate many everyday tasks.This will, in effect, streamline IT operations and potentially reduce costs at the same time. Virtual servers play a big part in this initiative by optimizing the way current data centers are run and making them more efficient. Workloads can be optimized by running multiple operating systems and applications on a physical server, which enables it to reach a much higher average utilization. Also, as workloads change over time, virtual machines can be redistributed between other virtual servers to continue to optimize and balance workloads.

  DSI applies to all aspects of the application lifecycle. It begins with the design of the application and ends with using applications like SMS and Microsoft Operations Manager (MOM) to manage and monitor the systems. The use of virtualization is key in this design, because it effectively decouples the application workload from its hardware.This enables you to move the workload from one physical server to another as the resource needs of the workload change. Virtualization allows for the rapid deployment of new sys- tems. Without virtualization, as the need develops for new servers, you may not be able to respond quickly enough because you’ll need to purchase new hardware for each server needed.

  Introduction to Microsoft Virtual Server • Chapter 1

  3 What Is Virtualization, and When Should You Use It?

  Virtualization is the concept of taking a single operating system and, instead of installing in on its own dedicated physical hardware, installing it on virtual hardware that is being presented by Microsoft Virtual Server 2005 R2 run- ning on a physical server (see Figure 1.1).The key with virtualization is the isolation of each virtual machine. Each virtual machine is unaware of the other virtual machines that are running on the virtual server. If one virtual machine crashes, it will not crash the other virtual servers. With new pro- cessor improvements from Intel and AMD, namely the new dual-core proces- sors, you can consolidate more servers onto a single physical server. With dual-core technology you are able to have a dual-processor server with a total of four processor cores.The jump that both AMD and Intel made from 32-bit to 64-bit processors has significantly improved the performance of the phys- ical server running Microsoft Virtual server 2005 R2. Consolidation ratios are not going to be the same on every server.They depend on the workloads of the virtual machines that are running on the physical server.

  A virtual server presents a common set of hardware to every virtual machine. It presents all the key components, such as common NIC, video card, motherboard, SCSI card, hard drives, CD-ROM, etc.The key is that it presents the same common hardware regardless what physical server the vir- tual servers are running on.This enables you to easily move workloads from one physical server running Microsoft Virtual Server 2005 over to another Virtual Server.The particular devices that are presented to the virtual machine are detailed later in this chapter.

  Advantages of Virtualization There are several scenarios where virtualization has tremendous advantages.

  We will outline a few scenarios that may be applicable to your environment.

  4 Chapter 1 • Introduction to Microsoft Virtual Server

Figure 1.1 Virtualization Diagram

  Production Data Centers

  Production servers can greatly benefit from virtualization technology, although this is most likely the first environment that you will want to target for virtualization. With any new technology that you are planning on imple- menting in your environment, it is usually best to implement in a test/pilot/production method to ensure the stability of production systems (see Figure 1.2). One of the key reasons for virtualization of production is that on average, 90 percent of Windows-based production servers run below 10 percent average utilization.This is a prime reason that virtualization is so prevalent today.You are able to save a great deal of money just by reducing the number of servers purchased. Imagine having a 10-to-1 or greater consol- idation ration.You are able to take a data center with 100 servers and consoli- date it to 10 servers that can fit in a single server rack. Many clients that we spoke to also look to virtualization of their production systems for other rea- sons besides consolidation. Some are looking to save on the utility cost from the servers and the cooling for the room. Some have maxed out their power capabilities and are facing an expensive electrical upgrade to continue growing.

  Introduction to Microsoft Virtual Server • Chapter 1

  5 Another huge advantage is recoverability. Each virtual server’s hard drive is

  represented by a single file.You are able to take a snapshot of this file for backup. Virtual Server 2005 R1 and later versions support vss for snapshots. A prime example of leveraging this technology is in the event of data loss or corruption. For instance, say you are applying the latest service pack to your virtual server and after the automatic reboot the machine comes up with a blue screen. If you took a snapshot of the hard disk that your OS was on, you can within seconds restore that snapshot and go back to before the service pack was applied.This saves you from needing to potentially rebuild the entire virtual server.

Figure 1.2 Phases from Test to Production

  Test and Development Data Centers

  One of the main advantages of using virtualization in the test and develop- ment areas is the ability to rapidly deploy new virtual serves.You can create a basic Windows Server virtual server and then clone that server any time that a new virtual server is needed.This saves a great deal of time compared to the standard method of loading each OS.You can also create specialty machines, such as specific application servers, Web servers, SQL servers, and so on. By

  6 Chapter 1 • Introduction to Microsoft Virtual Server

  utilizing this, you can prevent diverting needed resources from production servers to spend a great deal of time building test servers.

  You can also use the snapshot technology for the test and development system. Because of the nature of the systems, they are constantly having appli- cations installed and uninstalled and having major application changes. By using snapshots you can keep several versions of these systems to help avoid a total rebuild.

  Disaster Recovery

  Disaster recovery is becoming a critical issue for most companies today. One of the issues with disaster recovery is the potential cost. Without using virtu- alization as part of the disaster recovery solution, you are faced with repli- cating the hardware in your production site to the disaster recovery site. By using Microsoft Virtual Server at the disaster recovery location, you are able to significantly reduce the hardware costs. Recoverability and time may be more important to your company. By using Virtual Server you can meet all three objectives above with one solution.There are many ways to implement Microsoft Virtual Server 2005 for use in a disaster recovery site. Figure 1.3 outlines one of the commonly implemented solutions to meet clients’ disaster recovery needs.This solution enables clients to reduce their disaster recovery costs considerably. More importantly, they are able to take their server recovery times down from days or weeks to hours and even minutes.The key piece in this solution is the utilization of a Storage Area Network (SAN) at both locations. All the virtual server disk and configuration files reside on the SAN; it is the job of the SAN to replicate the data from the primary site over to the disaster recovery site. Because all the virtual servers’ data is being repli- cated in the event of a disaster, you simply need to power on the virtual servers and their guest operating systems at the disaster recovery site.

  Introduction to Microsoft Virtual Server • Chapter 1

  7 Figure 1.3 Disaster Recovery Diagram What Virtualization Tools Are Available?

  Virtual Server 2005 Migration Toolkit is a free tool available from Microsoft that enables you to migrate a physical machine to a virtual machine.This is commonly known as the P2V (physical-to-virtual) process.This may be used to make a clone of an existing physical machine for test and development purposes.You may use this as a tool to help move servers off their existing legacy hardware that may be close to failing.This can also be used for creating images of physical machines for disaster recovery purposes as well.This is a list of operating systems that the Migration Toolkit supports: Windows Server 2003 (Standard and Enterprise) Windows 2000 (Standard and Advanced) SP4 or later required

  Windows NT 4.0 Server (Standard and Enterprise) SP6a required

  Third-Party Virtualization Tools

  Virtualization technology utilization has exploded in the past few years. As with any product that is seeing this kind of growth, many companies jump on

  8 Chapter 1 • Introduction to Microsoft Virtual Server the bandwagon by developing tools to complement or enhance the product.

  There are still a limited number of third-party tools designed for Virtual Server 2005 R2 today, but as the product grows, many more may become available. One of the companies that specialize in such tools is PlateSpin.They have two main products that help to make the transition from a physical to a virtual environment much easier.The two products described below are PlateSpin PowerRecon and PlateSpin PowerConvert.

  PowerRecon is designed to evaluate your current physical environment and to assist you with your server consolidation planning. It is designed to give a complete inventory of your hardware and software and also show the utilization of your servers.This is done by installing a data collector in your environment and then choosing which servers you want to evaluate. One key point is that it does this without the need to install an agent on the server that it is collecting data from.This assessment should be run for a period of at least 30 days to collect the performance characteristics of your environment. The assessment consists of three phases: assess, design, and implement.This assessment is critical to consolidation planning because before you start the consolidation server you need to know how many host machines you need and how large the host server must be to handle the workload.

  PowerConvert is used to convert your physical machines into virtual machines. Without a tool to convert your servers from physical to virtual, you would need to build new virtual machines and then transition the applica- tions from the physical server to the virtual server, which would take a great deal of effort and time. PowerConvert accomplishes this by taking an image of the physical server, transferring that image to a virtual machine, and then making the necessary changes so that the machine can boot up as a virtual machine.The other advantage to this is that is does this by not destroying the data on the physical server. So if you need to revert from the virtual machine to the physical machine, it is as simple as turning the physical server back on. PlateSpin PowerConvert also supports V2P (virtual-to-physical) conversions, so if your virtual machine outgrows the resources in the virtual environment, you can convert it to run on its own physical server. It also supports taking an image of either a physical or virtual server and storing it in an image reposi- tory for backup or automated deployment purposes.

  Introduction to Microsoft Virtual Server • Chapter 1

  9 Designing & Planning… Evaluate Your Environment Using tools such as PlateSpin PowerRecon significantly reduces the amount of manual labor needed to evaluate your current server environ- ment. Analyzing the environment before consolidating can be critical to a successful consolidation by accurately sizing the host servers and number of hosts needed.

  How Does Virtualization Work?

  The basic idea of virtualization is taking a single physical machine and run- ning multiple virtual machines on top of that hardware.This is sometimes related to the concept of partitioning a hard disk into multiple logical drives. Virtualization works by taking the physical components of a machine and presenting virtual hardware instead. Instead of a machine having its own phys- ical hard drive, its hard drive is simply a file residing on the host machine’s file system. It also has a virtual NIC, video card, peripheral ports, CPU, and memory.These resources are managed by the Microsoft Virtual Server appli- cation that is running on the host machine.The virtualized hardware that is presented to the guest OS is outlined in this section. Presents single CPU Intel 440BX motherboard AMI BIOS Up to 3.6 GB RAM Up to four virtual IDE devices (CD-ROM or DVD-ROM drives) Up to four SCSI controllers

  Emulates Adaptec 7870 SCSI controller

  10 Chapter 1 • Introduction to Microsoft Virtual Server Emulates S3 Trio64

  Support for up to two virtual floppy disk drives.These can be mapped to a physical floppy disk drive or a virtual floppy disk drive using a floppy image .flp file. Up to two serial ports One parallel port LPT No USB support Standard 101-key keyboard Microsoft Intellimouse with PS2 interface Emulates DEC 21140 Ethernet card

  

Virtual PC versus Virtual Server 2005

  Microsoft Virtual PC 2004 and Virtual Server 2005 are both designed to enable a physical machine to host multiple virtual machines. Both products have a similar architecture and share many of the same features, but they also differ in many ways. Many of the features and the user interface of the Virtual PC were designed with the desktop user in mind. Virtual Server was designed with the system administrator in mind and is useful for hosting Enterprise Server products. It has many advanced features that make its user interface more complex. In the next few sections,we will take a closer look at some of the differences and outline some usage scenarios.

  Features That Are Found in

Both Virtual PC and Virtual Server 2005 R2

  Both products have many of the same core features.They both use the same file architecture; they use .vmc files for their virtual machine configuration file; and their hard disks are .vhd files.They both provide networking for the virtual machines, but Virtual Server adds a number of features that we will look at in the following section. Both products also provide the capability to use advanced disk features such as undoable disk modes.

  Differences between Virtual PC and Virtual Server 2005 R2

  Along with the many similarities, there are also many differences.The main differences come from the design of the two products. Virtual PC is designed for hosting desktop operating systems and applications and Virtual Server is designed for server operating systems and applications. See Table 1.1 for the OS support matrix.