Forgot your password?
typodupeerror
Book Reviews Books Media

Running Xen 98

Posted by samzenpus
from the read-all-about-it dept.
David Martinjak writes "Running Xen: A Hands-On Guide to the Art of Virtualization was published by Prentice Hall, and authored by Jeanna N. Matthews, Eli M. Dow, Todd Deshane, Wenjin Hu, Jeremy Bongio, Patrick F. Wilbur, and Brendan Johnson. The book, which will be referred to as simply Running Xen, was a great resource on Xen and virtualization from the administration side. A wide range of topics was covered from installing Xen all the way up to managing virtual resources, including migrating guest environments. Overall, the explanations were concise and understandable; while the information was presented in a straightforward manner. Running Xen was definitely a useful resource for administering systems with Xen." Keep reading for the rest of David's review.
Running Xen: A Hands-On Guide to the Art of Virtualization
author Jeanna N. Matthews, Eli M. Dow, Todd Deshane, Wenjin Hu, Jeremy Bongio, Patrick F. Wilbur, and Brendan Johnson
pages 586
publisher Prentice Hall
rating 9
reviewer David Martinjak
ISBN 0132349663
summary A hands-on guide to virtualization with Xen
The flow of the book was intuitive, and reasonable; this was especially valuable for discussing a newer technology where the terms could be confusing. Fortunately, the authors kept the language clear so that the reader easily could understand the subject of discussion. This unambiguous presentation of content was a welcomed feature.

Running Xen started with a thorough-enough explanation of virtualization. Several different approaches to virtualization were compared and contrasted, which should help the reader to understand where Xen resides in the whole domain. This first chapter was a great introduction as it provided just the right amount of information. At no point did I consider the explanations to be short or lacking; nor did I feel overloaded with details. The authors seemed adequately aware that the title of the book was Running Xen, and they stuck to that scope.

After the introduction, the book moved right into actually running Xen. This helped to keep the my attention on the subject, and tied back in to the proper flow of the material. At first, the chapter began with baby steps. It introduced the Xen LiveCD, and information on working within the Xen environment. Subsequent chapters moved into a more intermediate level of usage: installing Xen in a third-party distrobution, and running pre-built guest images. Popular third-party distrobutions such as Ubuntu, Gentoo, CentOS, and OpenSUSE were covered; and this section also included instructions for using compiled Xen binaries and building your own from source.

One of the topics I was most interested in was building a custom, minimal guest environment from a particular distro. Chapter 7, "Populating Guest Images", provided all of the information I was looking for along with some other interesting facts. The popular distros were covered again (Ubuntu, Gentoo, etc.), but this time a twist was added to the mix. "Populating Guest Images" started off with installing Windows XP in Xen. This was a complete surprise to me. If you prefer GNU/Linux on the server, but Windows XP on the desktop, and have been looking to consolidate with virtualization; this chapter is a must-read. The chapter also helped solidify the understanding of concepts presented earlier in the book. For example, the first chapter discussed two different types of guests: paravirtual (PV) and Hardware Virtual Machine (HVM). In "Populating Guest Images", the authors led the reader through building guests of each type. The process was presented in a logical fashion which was easy to follow, making the book that much more enjoyable.

Running Xen then moved on to putting the guests on the network. Chapter 10, "Network Configuration", covered several options for networking guest environments in Xen. It would be an understatement to say that this chapter was thorough. Overall, the authors did a great job explaining the differences between the networking options, and how to implement each one. Unfortunately the needs of the reader are variable, so this chapter overflowed with information. The upside was that readers with complex virtualized network segments will not be disappointed. The downside was that I, personally, only really needed a small percentage of the chapter's content. Therefore, much of the chapter was technically irrelevant to me individually.

There was one other unfortunate issue, which occurred in the next chapter. Chapter 11, "Securing a Xen System", contained syntax errors for iptables rules. Mainly one dash was used instead of two when specifying the destination port in some rules. For example, LISTING 11.10 displayed the syntax -dport which caused an error. However, the syntax was correct at other places in the book (LISTING 10.24, for example). Additionally, there was a problem on output formatting where the command prompt and output lines ran together in the print (LISTING 11.11). This could cause confusion for some readers intently following the text.

My only complaint with the book was that the chapter on network configuration seemed to be rather long. For a person working with Xen at a business level, especially mid-size to enterprise, this chapter provided an excellent amount of insight and information. But for the person at home building his/her own test server for simple purposes, much of the content in this chapter was overkill. Additionally the few syntax errors were eye-sores, but any person with iptables experience could easily identify and fix the problems. It is just in my opinion, a published book should be syntactically correct so that the reader is not presented with contradicting results; nor should the reader have to conduct additional searches to rectify mistakes from the book's pages. However, these items are minor and pale in comparison to the outstanding wealth of knowledge in the text.

This book is highly recommended for anyone interested in virtualization with Xen. In addition to the regular paperback, Running Xen is also available on Safari. The paperback additionally includes a coupon code for a 45-day pass to access the book via Safari online.

David Martinjak is a programmer, GNU/Linux addict, and the director of 2600 in Cincinnati, Ohio. He can be reached at david.martinjak@gmail.com.

You can purchase Running Xen: A Hands-On Guide to the Art of Virtualization 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.

Running Xen

Comments Filter:
  • by spun (1352) <{moc.oohay} {ta} {yranoituloverevol}> on Monday June 09, 2008 @04:32PM (#23715157) Journal
    On the other hand, most of us have read Zen and the Art of Motorcycle Maintenance. Which still doesn't tell you how to fix your motorcycle, that's what's so Zen about it.

    "What's the sound of one hand adjusting a timing belt?"
  • by squiggleslash (241428) on Monday June 09, 2008 @04:47PM (#23715359) Homepage Journal

    Xen and KVM are completely different types of virtualization solution. The supposed rivalry between the two is largely bad journalism, not rooted in anything to do with the platforms themselves.

    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.

  • by Richard W.M. Jones (591125) <rich@anne x i a .org> on Monday June 09, 2008 @05:29PM (#23715953) Homepage

    KVM is nice and shows promise, but performance wise the paravirtualized approach of xen is still significantly faster (as in very-near-bare-metal, even significantly faster than vmware ESX on most loads).

    VirtIO [lwn.net], which is in latest versions of KVM, paravirtualizes all the hardware and gives you almost all the benefit.

    KVM is where things are going because as a poster said above, it avoids having to write all the drivers twice over [livejournal.com]. Xen dropped the ball by not working closely with the Linux kernel developers. Now XenSource have been bought out by a Microsoft proxy [theregister.co.uk], so the future for Linux & Xen is looking even less rosy.

    As you say, Red Hat offers libvirt [libvirt.org] which hides the differences between virtualization systems, so for most administrators and application programmers, which system "wins" is not going to matter. (My personal opinion is that none of them will win outright, at least not for many many years - different approaches to virtualization are suitable for different areas).

    Rich.

  • by segedunum (883035) on Monday June 09, 2008 @06:27PM (#23716697)

    Xen and KVM are completely different types of virtualization solution.
    Well yes they do do things differently, but KVM does it better and simpler by just running on Linux as the base system hypervisor. From a maintenance point of view things get far simpler, as the OP said.

    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.
    That statement is just, well, daft. You're implying that Xen can't run VMs under Linux but KVM can, or Xen can run VMs on systems other than Linux or something that KVM can't do? They're both Linux only at this point, and Xen effectively runs a forked version of Linux because it isn't, and won't be, upstream.
  • by rips123 (654488) on Monday June 09, 2008 @08:28PM (#23717983)
    I've deployed xen at work. It has its issues. A report on these would be much more useful to the slashdot crowd than a book full of information thats largely out of date the moment its published so here goes:

    The two biggest issues that bit me:

    1. I wanted to use external USB drives in a xen virtual machine. I can do PCI passthrough (exposing a whole PCI device) to a guest but only on linux. Solaris support doesn't exist yet and I think the FreeBSD support is still in the pipeline. Tough luck if you want to run, say, a kernel-based ZFS distro on a guest OS like I did. I ended up using a linux guest with para-virtualized PCI and zfs-fuse but I still have some memory leak issues that mean I have to restart the fuse daemon every so often - not ideal.

    2. I wanted to virtualize an old windows PC used to run through web logfiles once a month. Xen can't virtualize DMA access so for hardware virtual machines like Windows XP, you end up with IO based disk access which uses MUCH more CPU than DMA access - especially for this sort of task.

  • by RobNich (85522) * on Monday June 09, 2008 @08:29PM (#23718001) Homepage
    The book HAS to be better than the documentation that RedHat provides for RHEL 5 Virtualization [redhat.com]. It ranks among the worst-written, most useless documents I've read in a long time.
  • by TheRaven64 (641858) on Tuesday June 10, 2008 @09:12AM (#23724191) Journal

    You're implying that Xen can't run VMs under Linux but KVM can, or Xen can run VMs on systems other than Linux or something that KVM can't do? They're both Linux only at this point, and Xen effectively runs a forked version of Linux because it isn't, and won't be, upstream.
    Xen is a hypervisor. It runs under Linux, not on top (although the Xen devs do often run Xen in KVM for development). It uses one or more slightly (or very, depending on your hardware) privileged guests to provide drivers. These can be Linux, NetBSD or Solaris.

    KVM only works on systems that support hardware virtualisation. Xen will run unmodified operating systems on these platforms, but also supports paravirtualised guests on older systems (and paravirtualised guests are faster on any hardware). As far as I know, KVM is x86-only, while Xen runs on x86, PowerPC, Itanium and ARM (Samsung are doing some very cool things with Xen on ARM).

    There are a few things that Xen supports that KVM doesn't, such as live migration. This is probably the right time for the obligatory plug for my book [amazon.co.uk], if you want to learn more about how Xen works.

  • by squiggleslash (241428) on Tuesday June 10, 2008 @10:00AM (#23725055) Homepage Journal

    Well yes they do do things differently, but KVM does it better and simpler by just running on Linux as the base system hypervisor. From a maintenance point of view things get far simpler, as the OP said.

    Sure, and Wifi does it better and simpler than Bluetooth by using Ethernet frames (The Bluetooth vs Wifi "war" is also a good example of where geeks get it completely, 100%, wrong by not recognizing the entirely different applications the technologies are aimed at.) You're comparing apples to oranges, and assuming that because KVM works better in a specific scenario that it works better.

    That statement is just, well, daft. You're implying that Xen can't run VMs under Linux but KVM can, or Xen can run VMs on systems other than Linux or something that KVM can't do? They're both Linux only at this point, and Xen effectively runs a forked version of Linux because it isn't, and won't be, upstream

    It's not daft, your response makes no sense. Let's break it down:

    You're implying that Xen can't run VMs under Linux but KVM can

    That's right. Xen cannot run VMs under Linux. Xen runs VMs on the bare hardware. In the Xen environment, operating systems run under Xen, not vice versa. The only way to run Xen "under" Linux is to run it in an emulator!

    or Xen can run VMs on systems other than Linux or something that KVM can't do?

    This sentence makes no sense as is. It can't run VMs under Linux, as stated above. In terms of operating system support, you can run various operating systems under Xen as "dom0". Dom0 is a special domain that most hardware is managed by by default (though you can redirect any almost piece of hardware to be managed by any guest system. For example, on my home server, one of the Ethernet cards is managed completely by a domU.) Dom0 can be one of many operating systems, including Linux-based systems, OpenSolaris/SunOS, OpenBSD, NetBSD, and certain versions of FreeBSD (with certain versions of Xen.) The only restrictions that go with being dom0 have to do with the kernels for those systems being Xen-aware.

    This flexibility brings enormous advantages incidentally. With enough memory, you can install something like Solaris as your domU and have it export NFS shares upon a ZFS file system to all of the domUs, giving every operating system you run the advantages of the host. At the other extreme, you can install something small and light - bugs aside, I found Xen's integration with Ubuntu Server 8.04 LTS wonderful when setting up my little firewall-gateway/servers box. I have the barest Ubuntu Server installation (no X11/GNOME/etc) as dom0, and even barer systems for the domUs It's great.

    They're both Linux only at this point, and Xen effectively runs a forked version of Linux because it isn't, and won't be, upstream.

    Xen is PowerPC, ix86, and AMD64 at the moment. In terms of operating systems it can run as dom0, see above. In terms of operating systems it can run as domU, well, the choice is massive.

    Really, what you're saying convinces me you haven't really investigated what makes Xen Xen. I would never install Xen on my laptop. I'd never install KVM on my server machine. Take another look at both, and see why their strengths make them suitable for different purposes, neither are solutions that fit every application, and they complement each other well in terms of the applications they efficiently support.

  • by David Jao (2759) <djao@dominia.org> on Tuesday June 10, 2008 @01:13PM (#23729519) Homepage

    There are a few things that Xen supports that KVM doesn't, such as live migration.

    Wait, what? KVM supports live migration [qumranet.com], and in fact KVM supports it better than Xen ever did.

    Xen allows live migration only between machines with identical or very similar processors. KVM supports live migration between any two systems that can run KVM. For example, if you want to live migrate from an Intel to an AMD host, KVM is your only option. If you want to live migrate a 32-bit guest between a 32-bit host and a 64-bit host, KVM will do that, Xen won't.

  • by squiggleslash (241428) on Wednesday June 11, 2008 @10:38AM (#23747531) Homepage Journal

    Counterpoint? Drepper's not explaining that the "KVM and Xen are competitors" war is valid, he's just buying into it without justifying it. He doesn't "get" Xen so he assumes it's used in the same areas as KVM and that, therefore, crude performance comparisons are valid. I've not really read much of his stuff before, so it'd be inaccurate to say I've lost respect for the guy on reading that article, but it does sound like he's "not getting it" which reflects somewhat poorly on him. I know I made the right decision putting Xen on my firewall/gateway server, I can't imagine even considering virtualization for a network-accessable no-monitor/keyboard box sitting in my closet. I also know that I wouldn't want Xen on my desktop.

    Saying "These both do virtualization therefore one is better than the other" is as silly as saying "Bluetooth and Wifi are both "doing wireless" therefore one is better than the other." The only way to make KVM usable in the area Xen excels is to refactor it so that Linux runs underneath it, not over it. This, of course, means it'll not be KVM, and it'll become a less than ideal application for desktop virtualization.

    Likewise Xen can be refactored so it runs under Linux rather than vice-versa. Then it'll be hampered by Linux's limitations, and for the most part by GNU's too. There's no good reason to do this, there already are numerous desktop virtualization systems out there, why undermine the only viable server virtualization system in an effort to compete in an area that already has numerous alternatives?

    If you want to compare KVM's performance, do it against its actual rivals like BOCHS and VMWare. If you want to compare Xen's... well, right now you have nothing to compare it to. You have to either say it's good enough for you, or it isn't, and if it isn't, buy multiple machines. If Drepper and others want to produce an alternative to Xen, they need to first understand what it is, why it's useful, and what it's used for. Clearly, if they're going to assume KVM is an alternative, they haven't bothered.

"Regardless of the legal speed limit, your Buick must be operated at speeds faster than 85 MPH (140kph)." -- 1987 Buick Grand National owners manual.

Working...