ENGLISH

The Book of Xen: A Practical Guide for the System Administrator

Book information

Publisher
No Starch Press
Year
2009
ISBN
1593271867, 9781593271862
Language
english
Format
PDF
Filesize
15 MB (16151970 bytes)
Edition
1
Pages
316\316
Time added
2010-02-18 13:16:04

Description

The Book of Xen (TBOX) is a great book for Linux system administrators who want to deploy Xen. The authors ground their recommendations in over four years of experience running Xen to support Internet-facing virtual private servers. I found their writing style to be very engaging; it reminded me of reading any one of Michael Lucas' No Starch books. If you know your way around Linux and want to deploy Xen in production, TBOX is the book for you.About two years ago I read and reviewed Professional Xen Virtualization by William Von Hagen. That book spends more time guiding the reader through the concept of virtualization, and tends to cover system administration from a wider angle than TBOX. In contrast, TBOX treats the reader more as a professional sys admin who wants to apply his or her skill set to Xen. TBOX does spend some time discussing Xen internals, and I found the depth of that discussion just right for this book. Other books discuss Xen internals to a greater degree, so there was no need to repeat material here.TBOX does tend to focus on running Linux domU on a Linux dom0. This is not surprising given the lesser maturity and popularity of other options, specifically as dom0. Ch 8 does cover Solaris and NetBSD, and Ch 13 is devoted to Windows as domU. As support for Xen matures I expect a second edition of TBOX to address other combinations of operating systems as dom0 and domU.TBOX is unique thanks to the sections on profiling and benchmarking (Ch 10), "tips" (Ch 14), and troubleshooting (Ch 15). I appreciate when authors of technical books share lessons and tricks from their own shops. I am also a big fan of their writing style and attempts at humor. This could easily have been a very dry technical book, but TBOX is entertaining from the start. Great work! Foreword......Page 17 Acknowledgments......Page 19 Introduction......Page 21 Virtualization: A Brief History......Page 22 So What’s Xen Again? (And Why Should I Use It?)......Page 23 So, Why Should I Use Xen?......Page 24 Overview of the Book......Page 25 But I Am Impatient!......Page 26 Virtualization Principles......Page 27 Virtualization Techniques: Full Virtualization......Page 29 How Paravirtualization Works......Page 30 Scheduling......Page 32 Memory......Page 33 I/O Devices......Page 36 Block Devices......Page 37 Putting It Together......Page 38 2: Getting Started......Page 39 Hardware Compatibility......Page 40 Installing CentOS......Page 41 Management with xm......Page 43 Making a DomU......Page 44 Configuring the DomU......Page 45 You’re Finished. Have a Cookie.......Page 47 3: Provisioning DomUs......Page 49 Selecting a Kernel......Page 50 Why This Is Not the Best Idea......Page 51 Stuff to Watch Out For......Page 52 Red Hat, CentOS, and Other RPM-Based Distros......Page 53 Debootstrap with Debian and Ubuntu......Page 54 QEMU Install......Page 56 virt-install-Red Hat’s One-Step DomU Installer......Page 57 Converting VMware Disk Images......Page 59 Manual Deployment......Page 60 QEMU and Your Existing Infrastructure......Page 61 Installing pypxeboot......Page 64 Automated Installs the Red Hat Way......Page 65 And Then . . .......Page 67 4: Storage with Xen......Page 69 Varying Types of Storage......Page 70 Basic Setup: Files......Page 71 LVM: Device-Independent Physical Devices......Page 73 Enlarge Your Disk......Page 77 LVM......Page 78 Copy-on-Write and Snapshots......Page 79 LVM and Snapshots......Page 80 Network Storage......Page 81 Closing Suggestions......Page 84 5: Networking......Page 85 Xen’s Network Setup Process......Page 86 Defining Virtual Interfaces......Page 87 Naming Virtual Interfaces......Page 88 Autoconfiguration......Page 90 Specifying a MAC Address......Page 91 Specifying an IP Address......Page 92 Networking with network-route......Page 93 Networking with network-bridge......Page 94 Networking with network-nat......Page 96 Configuration Variables......Page 97 Multiple-Bridge Setups......Page 98 Bridged and Routing......Page 99 Further Thoughts......Page 100 6: DomU Management: Tools and Frontends......Page 101 Xen-tools......Page 102 libvirt, virsh, and virt-manager......Page 107 Xen-shell......Page 111 Advantages for the Users......Page 115 Shared Resources and Protecting Them from the Users......Page 116 Tuning CPU Usage......Page 117 Controlling Network Resources......Page 120 Storage in a Shared Hosting Environment......Page 124 Regulating Disk Access with ionice......Page 125 Backing Up DomUs......Page 126 An Emulated Serial Console......Page 128 A Menu for the Users......Page 129 PyGRUB, a Bootloader for DomUs......Page 130 Making PyGRUB Work......Page 132 Wrap-Up......Page 134 8: Beyond Linux: Using Xen with Other Unix-like OSs......Page 135 Getting Started with Solaris......Page 136 Setting Up Xen......Page 138 Solaris SMF......Page 139 Creating a Solaris DomU......Page 140 Creating a Solaris DomU Under Linux......Page 142 OpenSolaris DomU Postinstall Configuration......Page 143 NetBSD’s Historical Xen Support......Page 144 Installing NetBSD as a Dom0......Page 145 Installing NetBSD as a DomU......Page 147 Beyond Paravirtualization: HVM......Page 149 9: Xen Migration......Page 151 Migration for Troglodytes......Page 152 Migration with xm save and xm restore......Page 153 Cold Migration......Page 154 How It Works......Page 155 Making Xen Migration Work......Page 156 ATA over Ethernet......Page 159 iSCSI......Page 162 Quo Peregrinatur Grex......Page 165 10: Profiling and Benchmarking Under Xen......Page 167 A Benchmarking Overview......Page 168 UnixBench......Page 169 Analyzing Network Performance......Page 170 Measuring Disk Performance with Bonnie++......Page 172 httperf: A Load Generator for HTTP Servers......Page 173 Tuning Xen for Optimum Benchmarking......Page 175 Profiling with Xen......Page 176 Getting OProfile......Page 177 Profiling Multiple Domains in Concert......Page 180 An OProfile Example......Page 182 Conclusion......Page 183 11: Citrix XenServer: Xen for the Enterprise......Page 185 Citrix’s Xen Products......Page 186 Ten Minutes to Xen......Page 187 Prerequisites......Page 188 Installing Citrix XenServer......Page 189 Administering VMs with the XenCenter......Page 190 Installing from the Debian Templates......Page 191 Templated Linux VM......Page 192 XenServer Tools in the DomU......Page 193 xe: Citrix XenServer’s Command-Line Tool......Page 194 XenServer’s Disk Management......Page 195 Xen Storage Repositories......Page 196 Emulated CD-ROM Access......Page 197 XenServer Resource Pools......Page 198 Citrix XenServer: A Brief Review......Page 199 12: HVM: Beyond Paravirtualization......Page 201 Principles of HVM......Page 202 HVM Device Performance......Page 203 HVM and SMP......Page 204 Xen HVM vs. KVM......Page 205 Working with HVM......Page 206 Creating an HVM Domain......Page 207 Interacting with an HVM Domain......Page 209 HVM Devices......Page 210 Paravirtualized Drivers......Page 211 And, for Our Next Trick . . .......Page 212 Why Run Windows Under Xen?......Page 213 Windows on Xen: Prerequisites......Page 214 Installing Windows Manually......Page 215 A Discussion of HALs......Page 216 Installing Windows the Red Hat Way......Page 217 Windows with the Virtual Framebuffer......Page 219 Et Voilà!......Page 220 Graphics Cards......Page 221 GPL Windows Paravirtualized Drivers......Page 222 Ongoing Development......Page 224 14: Tips......Page 225 Compiling Xen......Page 226 Compile-Time Tuning......Page 228 paravirt_ops Dom0......Page 229 paravirt_ops DomU......Page 231 The Xen API: The Way of the Future......Page 233 Managing Memory with the Balloon Driver......Page 234 PCI Forwarding......Page 235 GRUB Configuration......Page 236 Enabling Serial Output......Page 237 Xen and LILO......Page 238 The Virtual Framebuffer......Page 239 Use of the XenStore for Fun and Profit......Page 240 Automatically Connecting to the VNC Console on Domain Boot......Page 241 15: Troubleshooting......Page 245 Errors at Dom0 Boot......Page 246 Creating Domains in Low-Memory Conditions......Page 248 Troubleshooting Disks......Page 249 VM Restarting Too Fast......Page 250 Troubleshooting Xen’s Networking......Page 251 iptables......Page 253 Other Messages......Page 254 The Importance of Disk Drivers (initrd Problems)......Page 256 XenStore......Page 257 Logs and What Xen Writes to Them......Page 258 Xen’s Backend Architecture: Making Sense of the Debug Information......Page 260 Domain Stays in Blocked State......Page 261 Debugging Hotplug......Page 262 strace......Page 263 Mysterious Lockups......Page 264 Mailing Lists......Page 265 xen-bugtool......Page 266 Some Last Words of Encouragement......Page 267 A: xm Reference......Page 269 xm Subcommands......Page 270 B: The Structure of the Xen Config File......Page 277 List of Directives......Page 279 HVM Directives......Page 284 Device Model Options......Page 286 Index......Page 289 Updates......Page 314

Similar books