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