You are previewing Xen Virtualization.
O'Reilly logo
Xen Virtualization

Book Description

A fast and practical guide to supporting multiple operating systems with the Xen hypervisor

About This Book

  • Installing and configuring Xen

  • Managing and administering Xen servers and virtual machines

  • Setting up networking, storage, and encryption

  • Backup and migration

  • Who This Book Is For

    This book is for Linux administrators who want to use Xen virtualization for development, testing, virtual hosting, or operating systems training.

    What You Will Learn

  • Getting started with virtualization and Xen

  • Installing Xen from pre-built packages using yum

  • Installing and compile Xen from source

  • Running guest domains under Xen:

  • Create Ubuntu guest domain using debootstrap

  • Create NetBSD domain using install image

  • Create a Centos image using Qemu

  • Create Slackware domain using domU image from jailtime

  • Managing remote Xen instances using:

  • Xen manager (xm)

  • XenMan

  • Virt-manager

  • Configuring Xen for networking

  • Connecting domains using:

  • Bridged networking uses network bridge and hardware MAC addresses

  • Routed networking uses Dom0 for all traffic

  • Implementing storage solutions for guest domains:

  • Using Files—file based; perfect for testing

  • Using Network File Systems (NFS) works with remote NFS server

  • Using Logical Volume Management (LVM) for enterprise-grade storage

  • Securing your domain by encrypting root file systems

  • Plain device mapper-based encryption

  • Key-based device mapper encryption using LUKS

  • Migrating live domains from one server to another

  • Saving and restoring a domain

  • Trends and forthcoming advances in the Xen world:

  • libvirt to simplify access to virtualization domains in a vendor/hypervisor-independent way

  • VMcasting for transferring virtual machine images from the server to the client using RSS 2.0

  • In Detail

    Xen is an open-source paravirtualization technology that provides a platform for running multiple operating systems on one physical hardware resource, while providing close to native performance. Xen supports several operating systems—Linux, FreeBSD, Windows, and NetBSD. It enables you to easily test, deploy and run your software and services on multiple operating systems with resource isolation and great performance. It is also a terrific way to consolidate your servers, save hardware and maintenance costs, and minimize downtime. Xen is one of the most popular open source projects in the world and vendors like IBM, Sun, HP, RedHat and Novell are working on integrating Xen into their Linux servers.

    Xen was originally developed in 2003 at the http://www.cl.cam.ac.uk/research/srg/netos/xen/ University of Cambridge Computer Laboratory and we now have both commercial and free versions of the Xen hypervisor. The commercial versions are built on top of the open-source version with additional enterprise features. In this book we explore and use the open-source version of Xen.

    This concise handbook is ideal for professionals who want a user-friendly reference beside them while they get working with Xen and virtualization. Its easy-to-navigate content offers bite-sized walkthroughs for a wide variety of common virtualization tasks using Xen. We use Fedora Core as the host operating system in this book. The book shows you how to add Xen support to it, leads you through the creation of guest domains running different operating systems and follows up by dissecting a range of common virtualization tasks.

    Style and approach

    Each chapter is a collection of practical tasks that demonstrate how to achieve common virtualization tasks ou then learn how it works so that you can apply this knowledge to your Xen installation and environment.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Xen Virtualization
      1. Table of Contents
      2. Xen Virtualization
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. Preface
        1. What This Book Covers
        2. Conventions
        3. Reader Feedback
        4. Customer Support
          1. Errata
          2. Questions
      7. 1. Introduction
        1. What is Xen?
          1. How Does it Work?
          2. What Can I Do with It?
        2. Xen Terminologies
        3. Summary
      8. 2. Running Xen
        1. Installing Xen from Binary Packages
          1. Time for Action—Installing Xen with yum
              1. What Just Happened?
        2. Installing Xen from Source
          1. Time for Action—Compile Xen
              1. What Just Happened?
        3. Summary
      9. 3. Creating Virtual Machines
        1. A Plan for Creating Xen Domains
        2. Physical Address Extension
        3. Compiling a domU Kernel
        4. Xen Domain Memory
        5. Pygrub
        6. Ubuntu Feisty
          1. Time for Action—Bootstrapping an Ubuntu System
              1. What Just Happened?
        7. NetBSD
          1. Time for Action—Install NetBSD
              1. What Just Happened?
        8. CentOS
          1. Time for Action—Using qemu to Create a CentOS Image
              1. What Just Happened?
        9. Slackware
          1. Time for Action—Utilize Xen Images from jailtime.org
              1. What Just Happened?
        10. Summary
      10. 4. Managing Xen
        1. Xen Domain Configuration Files
        2. Xen Management User Interface—xm
          1. Time for Action—Xen Manager
              1. What Just Happened?
        3. XenMan—Installing and Running
          1. Time for Action—Install and Run XenMan
              1. What Just Happened?
        4. Virtual Machine Manager
          1. Time for Action—Running virt-manager
              1. What Just Happened?
        5. Summary
      11. 5. Networking
        1. Bridged Networking
          1. Time for Action—Using Bridged Networking
              1. What Just Happened?
        2. Routed Networking
          1. Time for Action—Using Routed Networking
              1. What Just Happened?
        3. Virtual Local Network with Network Address Translation
          1. Time for Action—Using VLAN with NAT
              1. What Just Happened?
        4. Summary
      12. 6. Storage
        1. Files
        2. NFS
          1. Time for Action—Using NFS
              1. What Just Happened?
        3. Logical Volume Management
          1. Time for Action—Using LVM
              1. What Just Happened?
        4. Advanced Storage Options
          1. Redundant Array of Independent/Inexpensive Drives
          2. Global Network Block Device
        5. Summary
      13. 7. Encryption
        1. Device Mapper-Based Encryption
          1. Time for Action—Encrypting Block Devices
              1. What Just Happened?
        2. Device Mapper-Based Encryption Using LUKS
          1. Time for Action—by Extending dm-crypt
              1. What Just Happened?
        3. Summary
      14. 8. Migration
        1. Migration Requirements
        2. Saving and Restoring a Domain
          1. Time for Action—Migrate Domains on your Xen Server
              1. What Just Happened?
        3. Live Migration
          1. Time for Action—Relocation of an Active Running domain
              1. What Just Happened?
        4. Summary
      15. 9. Xen Future
        1. Libvirt
        2. Vmcasting
        3. Summary
      16. Index