ps i: (; v s s o r t w v h \<: soli t ions s i-: k i i: s Virtualization from the Trenches Kenneth Hess and Amy Newman i -r-r-r->i mioour: TECH KIS CHE INFORM AT 8LIOTHEK UNIVERSITATSBiCLIOTHEK HANNOVER An Imprint, of Pearson Education PRENTICE HALL Upper Saddle River, NJ a Boston Indianapolis n San Francisco New York Toronto Montreal London Munich a Paris Madrid Cape Town Sydney a Tokyo Singapore Mexico City
Foreword Acknowledgments About the Authors Preface xv xvii xix xxi Part I Virtualization Basics and Technology Choices 1 Chapter 1 To Virtualize or Not to Virtualize? 3 A Virtual History 3 Virtualization Explained 4 Virtualization Workload Candidates 4 Consolidating Web Services with VMs 4 Mean Time to Restore 5 Aging Infrastructure 5 Infrastructure That Is Out ofcapacity 5 Underutilization 6 Economy of Virtualization 6 Practical Aspects of Virtualization 6 Minimizing Hardware Costs 6 Providing Disaster Recovery 9 Consolidating Idle Workloads 9 Balancing Loads 10 Software Tests 12 vli
viii Contents Centralized Server Management Power Conservation '5 1^ Faster Server Deployment 15 Service Commoditization 15 Summary ^ Chapter 2 Comparing Virtualization Technologies 17 Guest OS/Host OS 17 VMware Server 18 SunxVM (VirtualBox) 18 Hypervisor 18 Citrix Xen 19 VMware ESX/VMware ESXi 19 Microsoft Hyper-V 19 Emulation 19 Bochs 20 QEMU 20 Microsoft Virtual PC and Virtual Server 20 Kernel-Level 21 KVM 21 User-Mode Linux 21 Shared Kernel 21 Solaris Containers (Zones) 22 OpenVZ 23 In the Virtual Trenches 23 Summary 24 Chapter 3 VMware Server 25 The VMware Server Console 26 Creating Virtual Machines 27 Customizing Virtual Machines 37 Virtual Machine Files and Folders 41 File and Folder Security 42 File Names and Roles 42 VMware Server in the Real World 44 Summary 46
IX Chapter 4 VMware ESXi 47 The Virtual Infrastructure Client Console 47 Creating Virtual Machines 48 Customizing Virtual Machines 55 Virtual Machine Files and Folders 61 File and Folder Security 61 File Names and Roles 61 VMware ESXi in the Real World 62 Summary 65 Chapter 5 Citrix XenServer 67 XenServer, the Hypervisor 67 XenCenter The Xen Console 68 Creating Virtual Machines 69 Customizing Virtual Machines 75 Virtual Machine Files and Folders 82 Resource Pools 82 Virtual Machine Templates 82 Converting a VM to a Template 83 Installing a New VM from the Template 83 XenServer in the Real World 84 Summary 86 Chapter 6 Microsoft Virtual PC 87 The VPC Console 88 Creating Virtual Machines 89 Customizing Virtual Machines 94 Virtual Machine Files and Folders 100 File and Folder Security 101 File Names and Roles 101 Summary 102 Chapter 7 Microsoft Hyper-V 103 The Console 103 Creating Virtual Machines 104 Customizing Virtual Machines 110
X Contents Virtual Machine Files and Folders 111 File and Folder Security 111 File Names and Roles 111 Summary 112 Chapter 8 VirtualBox 113 The VirtualBox Server Console 113 Creating Virtual Machines 115 Customizing Virtual Machines 123 Virtual Machine Files and Folders 131 File and Folder Security 131 File Names and Roles 131 VirtualBox in the Real World 131 Summary 134 Part II Applying Virtualization 135 Chapter 9 Server Virtualization in Action 137 Configuring Dedicated Servers with Virtualization 137 Preparing the Virtual Machine 138 Dedicating the Server 142 Deploying Server Appliances 144 Adjusting and Tuning Virtual Servers 144 RAM 145 Virtual Machine Add-ons ortools 145 Virtual Disks 145 Virtual Machine Pagefiles and Swap Space 145 Host Machine Performance Tuning 146 Network Optimization 147 Securing Virtual Servers 147 Block or Remove Services 148 Use Antivirus Software 148 Perform Regular System Security Audits 148 VM Backup 148 File Copy 149 VM Backup Software 149 Vendor Backup Solution 149
Xl Migrating VMs to New Servers 1 SO File Copy Migration 150 Visualization Software Migration 150 Migrating Physical to Virtual (P2V) 151 CD-Based P2V Migration (Cold Cloning) 151 Live P2V Migration (Hot Cloning) 152 Manual Cloning 159 Summary 160 Chapter 10 Desktop Virtualization in Action 161 Terminal Services 161 Smart Terminal 162 Dumb Terminal 163 Hosted Desktop 163 Web-Based Solutions 164 Hosted Web Applications 164 Hosted Web-Based Pseudo-Desktop Systems 165 Localized Virtual Desktops 167 Live CD 167 Live USB 169 Virtualization Software 170 Summary 173 Chapter 11 Network and Storage Virtualization in Action 175 Virtual Private Network (VPN) 175 Hardware VPN 176 Software VPN 176 Virtual Local Area Network (VLAN) 186 Standard VLAN 186 VMware VLAN 187 Combination VLAN 188 SAN and VSAN 188 Data Transportation 189 NAS 190 Summary 190
Part III Building the Virtual Infrastructure: Hardware's Role in Virtualization 191 Chapter 12 Form-Factor Choices and Their Implications 193 Towers, Racks, and Blades 194 Beyond Form Factor, Filling the Footprint 197 Understanding Cores and Sockets 198 Mitigating I/O and Memory Issues 201 Summary 203 Chapter 13 Choosing a Vendor 205 Aligning Hardware with Software 206 The Vendors 209 IBM 210 HP 211 Dell 213 Sun 214 Comparing the Offerings 217 White Box 218 Cloud Computing 219 Summary 221 Chapter 14 Beyond the Box 223 Storage Virtualization 224 Network Virtualization 228 Switches 229 HBAs and Other Network Connectivity 230 When to Consider Infrastructure Orchestration 232 I/O Virtualization 232 Supplemental Products 233 Summary 235 Part IV From Development to Production: Managing the Virtual Infrastructure 237 Chapter 15 Laying the Foundation: The Planning Stage 239 Selling Senior Management on Virtualization 240 Virtualization Benefits Beyond Cost Savings 242
Kiii Cross-Functional Teams 243 The Right Tool for the RightJob 245 Types of Planning Tools 247 Testing the Deployment 249 Looking Ahead to the Long Term 250 Summary 251 Chapter 16 Deployment 253 Choosing Which Applications to Virtualize 254 Knowing What You Have: Autodiscovery Tools 255 Incorporating Automation (Before and After Your Virtual Machines Go Live) 258 Choosing an Automation Tool 258 Automation Vendors and Products 260 Securing Your VMs 261 Summary 262 Chapter 17 Postproduction: Wrapping It Up 265 Up and Running, Keep Things Humming 266 Dynamic Movement 266 Monitoring Tools 267 Disaster Recovery 268 Budgeting 270 Final Thoughts 272 Appendix Virtual Machine Installation 273 Preinstallation Considerations 273 Preparing Setting to Install Your VMs 278 a Password 281 Operating System Installation 284 Index 291