view README @ 7172:9c6b39746b78

Fix localhost live migration. We were overvigorously wiping out the store
entries when a domain closed and on save, which meant that the /vm entries
disappeared when a localhost migration occurred. XendCheckpoint has had extra
exception handling and logging added. It also now calls back through
XendDomain.restore_,which has the correct locking semantics to prevent race
conditions during migration.

Added assertions to XendCheckpoint to ensure that the channels are set after
XendDomainInfo.restore. I don't see why they would not be, and the old code
meant that in the case that they were not, IntroduceDomain would not be called
on the new domain, breaking Xend restart.

relocate calls through XendDomain.domain_restore_fd rather than directly to
XendCheckpoint to isolate XendCheckpoint from the rest of the world, and to
allow XendDomain to pass itself into XendCheckpoint for a callback.

Simplify the XendCheckpoint / XendDomainInfo interlock, giving only two
states, OK and TERMINATED. If XendCheckpoint asks for a suspend, but sees a
shutdown, it is valid for it to proceed -- either way the domain has stopped.
Higher level tools may wish to disallow this, but at the very least, there is
no sense in waiting for a suspend that will never come.

Signed-off-by: Ewan Mellor <>
author emellor@ewan
date Tue Oct 04 11:14:50 2005 +0100 (2005-10-04)
parents a83ac0806d6b
children f1abe953e401
line source
1 ###############################
2 __ __ ____ ___
3 \ \/ /___ _ __ |___ \ / _ \
4 \ // _ \ '_ \ __) || | | |
5 / \ __/ | | | / __/ | |_| |
6 /_/\_\___|_| |_| |_____(_)___/
8 ###############################
10 University of Cambridge Computer Laboratory
11 3 November 2004
15 What is Xen?
16 ============
18 Xen is a Virtual Machine Monitor (VMM) originally developed by the
19 Systems Research Group of the University of Cambridge Computer
20 Laboratory, as part of the UK-EPSRC funded XenoServers project.
21 Xen is freely-distributable Open Source software, released under the
24 The 2.0 release offers excellent performance, hardware support and
25 enterprise-grade features such as live migration. Linux 2.6, 2.4 and
26 NetBSD 2.0 are already available for Xen, with more operating system
27 ports on the way.
29 This file contains some quick-start instructions to install Xen on
30 your system. For full documentation, see the Xen User Manual. If this
31 is a pre-built release then you can find the manual at:
32 dist/install/usr/share/doc/xen/pdf/user.pdf
33 If you have a source release, then 'make -C docs' will build the
34 manual at docs/pdf/user.pdf.
36 Quick-Start Guide - Pre-Built Binary Release
37 ============================================
39 [NB. Unless noted otherwise, all the following steps should be
40 performed with root privileges.]
42 1. Install the binary distribution onto your filesystem:
44 # sh ./
46 Amongst other things, this will install Xen and XenLinux kernel
47 files in /boot, kernel modules and Python packages in /lib, and
48 various control tools in standard 'bin' directories.
50 2. Configure your bootloader to boot Xen and an initial Linux virtual
51 machine. Note that Xen currently only works with GRUB: less common
52 alternatives such as LILO are *not* supported. You can most likely
53 find your GRUB menu file at /boot/grub/menu.lst: edit this file to
54 include an entry like the following:
56 # title Xen 2.0 / XenLinux 2.6
57 # kernel /boot/xen-2.0.gz dom0_mem=<mem-kb> console=vga
58 # module /boot/vmlinuz-2.6-xen0 root=<root-dev> ro console=tty0
60 For <mem-kb> you should specify the amount of memory, in kilobytes,
61 to allocate for use by your initial XenLinux virtual machine. Note
62 that Xen itself reserves about 32MB memory for internal use, which
63 is not available for allocation to virtual machines.
64 For <root-dev>, specify your usual root partition (e.g., /dev/hda1).
66 3. Reboot your system and select the "Xen 2.0 / XenLinux 2.6" menu
67 option. After booting Xen, XenLinux will start and your
68 initialisation scripts should execute in the usual way.
70 Quick-Start Guide - Source Release
71 ==================================
73 First, there are a number of prerequisites for building a Xen source
74 release. Make sure you have all the following installed, either by
75 visiting the project webpage or installing a pre-built package
76 provided by your Linux distributor:
77 * GCC (preferably v3.2.x or v3.3.x; older versions are unsupported)
78 * GNU Make
79 * GNU Binutils
80 * Development install of libcurl (e.g., libcurl-dev)
81 * Development install of zlib (e.g., zlib-dev)
82 * Development install of Python v2.2 or later (e.g., python-dev)
84 [NB. Unless noted otherwise, all the following steps should be
85 performed with root privileges.]
87 1. Download and untar the source tarball file. This will be a
88 file named xen-unstable-src.tgz, or xen-$version-src.tgz.
89 You can also pull the current version from the SCMS
90 that is being used (Bitkeeper, scheduled to change shortly).
92 # tar xzf xen-unstable-src.tgz
94 Assuming you are using the unstable tree, this will
95 untar into xen-unstable. The rest of the instructions
96 use the unstable tree as an example, substitute the
97 version for unstable.
99 2. cd to xen-unstable (or whatever you sensibly rename it to).
100 The Linux (2.4 and 2.6), netbsd and freebsd kernel source
101 trees are in the $os-$version-xen-sparse directories.
103 On Linux:
105 3. For the very first build, or if you want to destroy existing
106 .configs and build trees, perform the following steps:
108 # make world
109 # make install
111 This will create the directories linux-2.6-xen0/ and
112 linux-2.6-xenU/ after first cleaning everything. It will
113 create and install into the dist/ directory which is the
114 default install location. It will build the xen binary
115 (xen.gz), the boot images for dom0 and an unprivileged
116 guest kernel (vmlinuz-2.6.x-xen0 and vmlinuz-2.6.x-xenU
117 respectively), the tools and the documentation.
119 4. To rebuild an existing tree without modifying the config:
120 # make dist
122 This will build and install xen, kernels, tools, and
123 docs into the local dist/ directory.
125 5. To rebuild a kernel with a modified config:
127 # cd linux-2.6-xen0 # or linux-2.6-xenU
128 # make ARCH=xen menuconfig # or xconfig
129 # cd ..
130 # make dist
131 # make install
133 You can copy your own config into linux-2.6-xen0 first.
134 Alternatively, you can also copy your config file to
135 dist/install/boot/config-$version-xen0/U. This is picked up
136 when a make dist is done. Include the ARCH=xen directive for
137 all make commands when building the kernels.
139 6. To see a full list of targets and a brief description, type:
140 # make help
142 7. Edit your grub.conf file as described above to have an
143 appropriate entry for your new kernel.