Forgot your password?
typodupeerror
Programming Book Reviews

The Book of Xen 88

Posted by samzenpus
from the read-all-about-it dept.
swsuehr writes "The Book of Xen: A Practical Guide for the System Administrator provides an excellent resource for learning about Xen virtualization. I frequently need to create test environments for examples that appear in various books and magazine articles (in the interest of full disclosure, I've never written for the publisher of this book). In the days before virtualization that meant finding and piecing together hardware. Like many readers, I've been using virtualization in one form or another for several years, including Xen. This book would've saved hours searching around the web looking for tidbits of information and sifting through what works and doesn't work in setting up Xen environments. The authors have done the sifting for me within the ~250 pages of the book. But far beyond, the authors also convey their experience with Xen using walkthroughs, tips, and recommendations for Xen in the real world." Read on for the rest of Steve's review.
The Book of Xen: A Practical Guide for the System Administrator
author Luke Crawford, Chris Takemura
pages 312
publisher No Starch Press
rating 9/10
reviewer Steve Suehring
ISBN 1593271867
summary A guide for using Xen for virtualization.
The Book of Xen is written with the system administrator in mind; someone who is comfortable with tasks like installing Linux and working with the command line. While it wouldn't be impossible for someone completely new to Linux to accomplish the tasks in the book, a bit of experience would go a long way to both visualize and complete the installation and configuration steps shown in the book. As stated in the introduction, the book is organized "(mostly) alternating between theoretical and practical discussion [because] an admin needs both practical experience and a firm theoretical ground to effectively solve problems..." (xxiii).

The authors do an excellent job of explaining what Xen is and where it fits in the virtualization landscape. This explanation begins with the introduction where the reader gathers a brief history of virtualization along with Xen's place in the landscape. Xen's limitations and reasons for using Xen are also covered right in the introduction, along with an overview of the book.

Chapter 1 begins with a high-level overview of Xen. This discussion is excellent if only to get the readers on equal footing for the discussions to come later in the book. Included in this chapter is a discussion of various techniques for virtualization including Full Virtualization, OS Virtualization, and Paravirtualization. The section on Paravirtualization leads nicely into some of the underlying details of scheduling, interrupts, and memory, and other resource management which are handled by Xen and discussed later in the chapter.

Chapter 2 sends the reader down the path of installing and using Xen. It's a short chapter, coming in at about 9 pages, and the reader is expected to be able to handle an install of CentOS with just a bit of guidance from the authors on specific options to select. This is a key point for those among us who have a preference for a certain Linux distribution. The book isn't tied specifically to a single distro, as the authors note in the introduction, "[w]e've tried to keep this book as distribution- and version-independent as possible, except in the tutorial sections, where we try to be extremely specific and detailed..." (xxiv). The base or host system upon which the examples run is based on CentOS, which the authors acknowledge and highlight in Chapter 2, "[f]or the purposes of this chapter, we'll assume you're installing CentOS 5.x with the server defaults and using its built-in Xen support. If you're using something else, this chapter will probably still be useful, but you might have to improvise a bit" (13). There is discussion of the Xen-tools package in a later chapter which shows its installation under Debian Linux too. So far from being tied to one distro, the book is refreshingly neutral in this regard.

By the end of Chapter 2, the reader has a working Xen host system and a domain 0 or dom0 host upon which to provision virtual machines. Included in Chapter 3 is a discussion of how to provision guest operating systems, known as domU in Xen-speak. The authors devote a good number of pages to making this task clear, and work through examples of basic domU installation and the use of package management systems and Debian's debootstrap to create domUs. Additionally in Chapter 3 the reader learns how to convert VMware disk images to a format usable by Xen.

Chapters 4 and 5 examine details of the Xen backend, including storage and networking. Chapter 4 stands out for its recommendation of blktap and LVM (Logical Volume Manager) as the storage backend as well as an overview of LVM itself, along with the use of networked storage for Xen.

Chapter 6 looks at tools for management of Xen, focusing on Xen-tools, libvirt, and Xen-shell while Chapter 7 gives advice for hosting untrusted users with Xen. Chapter 8 discusses the use of Xen with Unix-like operating systems and includes sections on Solaris and NetBSD.

The ability to migrate the virtual machine from one physical machine to another is one of the advantages of virtualization. As pointed out by the authors, a virtual machine might be migrated to take advantage of newer hardware, to perform maintenance, or any number of other reasons. Chapter 9 is of interest for its discussion of Xen migration. Cold and Live migrations are examined and Footnote 1 on page 126 is interesting for its reference to the Kemari Project and Project Remus which are projects to add hardware redundancy to Xen.

Tools and techniques for the measurement of Xen performance are shown in Chapter 10, which walks the reader through basic usage of well-known tools such as Bonnie++, httperf, UnixBench, and others. More importantly for the Xen admin is the discussion of Xen-aware profilers like Xenoprof which is "a version of OProfile that has been extended to work as a system-wide profiling tool under Xen..." (151).

Chapter 11 covers the Citrix XenServer, which is the enterprise-grade commercial Xen product from Citrix. The authors summarized it best in the review of Chapter 11: "Can Citrix's product replace the open source Xen? As always, the answer is maybe. It offers significant improvements in management and some interesting new capabilities, but that's balanced against the substantial cost and annoying limitations" (174).

Chapter 12 begins the discussion of Hardware Virtual Machines (HVMs), which are virtualization extensions that enable "an unmodified operating system [to run] as a domU" (176). This means the ability to run an unmodified version of Microsoft Windows as a guest OS within a Xen environment. The HVM discussion in Chapter 12 leads nicely into Chapter 13, "Xen and Windows".

The main chapters of the book end with Chapter 14, "Tips", and Chapter 15, "Troubleshooting". Both chapters draw on the experience of the authors and provide value to the book for their recommendations. Though the tool of choice for troubleshooting is the nearest Google search box, it's still helpful to glance over the content in the Troubleshooting chapter if for no other reason than to maybe remember that it's there when you receive the dreaded "Error: DestroyDevice() takes exactly 3 arguments" error.

The Book of Xen is almost certainly a time-saver for anyone looking to implement Xen or virtualization with Linux. The back cover states "The Complete Guide to Virtualization with Xen". The book lives up to that statement and more.

You can purchase The Book of Xen: A Practical Guide for the System Administrator from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

*

This discussion has been archived. No new comments can be posted.

The Book of Xen

Comments Filter:
  • by Locke2005 (849178) on Monday December 14, 2009 @02:05PM (#30433420)
    They should have named this book The Zen of Xen.
  • by Colin Smith (2679) on Monday December 14, 2009 @02:28PM (#30433696)

    Y'know, there by default vs reinstalling your kernel and patching everything every release etc.
     

  • by reset_button (903303) on Monday December 14, 2009 @03:16PM (#30434234)

    Redhat et al are doing xen .. I think (corrections please)

    Correction: Red Hat aquired Qumranet, the inventors of KVM (link [redhat.com]), so Red Hat is abandoning Xen in favor of KVM as well.

  • by Anonymous Coward on Monday December 14, 2009 @03:43PM (#30434552)

    If you want to run a single physical computer with multiple operating system instances, such as replacing a bank of servers with a single machine, Xen is your guy. If you want to run VMs under Linux, KVM is your friend. Conflating the two is like comparing... well, to use a car analogy, for this is Slashdot, a railroad with a tractor trailer.

    I believe this statement is False. I replaced a bank of servers using Xen. It worked fine, but I needed better driver support and its fork of 2.6.18 or whatever wasn't cutting it.

    I switched to KVM two years ago and have had better success than with XEN. On one host right now, I have 8 Windows 2k guests including a SQL Server, Exchange servers, domain controllers and web servers. There are also 4 various flavors of linux servers running.

    Using KVM has been a joyous breeze compared to dealing with XEN.

The superior man understands what is right; the inferior man understands what will sell. -- Confucius

Working...