view README @ 7446:18eb059ae471

New network-bridge script and associated gubbins.

This is Kurt Garloff's reworked network-bridge script:

* we got rid of ifconfig
* it works for netdev != eth0
* arp on and off are symmetric as are ifdown and ifup
* ifup will be passed the ifcfg config file name if needed
(the ifup may otherwise figure that the veth0 hardware is
NOT the same as the original ${netdev} and not use the same
config -- this happens on SUSE. Charles Coffing tracked this
one down.)

Plus Kurt's avoid-dash patch:

the network setup scripts on SUSE have trouble with the bridge
name xen-br0; they don't expect the '-'.
Arguably this should be fixed.
But I assume there's more scripts out there which may not like it,
so I suggest the following patch to rename xen-br0 to xenbr0.

Plus Charles Duffy's patch to support multiple bridges:

The attached patch allows the network-bridge script to be used to
generate multiple bridges corresponding to different physical
interfaces. It adds a new parameter, "vifnum", used to refer both to
the loopback interface to be used and to set defaults regarding the
physical interface and bridge name.

Thus, if one wishes to start xenbr0 on eth0 and xenbr1 on eth1, one
need only call:

network-bridge start ## vifnum is 0 by default
network-bridge start vifnum=1

...well, that and set loopback.nloopbacks=2 in the Dom0 kernel

Plus renaming of virtnum to vifnum in Charles' patch, as requested by Ian Pratt.

Plus a fix to DevController to allocate vif IDs starting from 0 (i.e. vif2.0
is now domain 2's first vif, as opposed to vif2.1 in the recent past).

Plus tidying up inside network-bridge using some helper variables.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Wed Oct 19 16:24:54 2005 +0100 (2005-10-19)
parents f1abe953e401
children 31d86fc0a271
line source
1 ###############################
2 __ __ ____ ___
3 \ \/ /___ _ __ |___ \ / _ \
4 \ // _ \ '_ \ __) || | | |
5 / \ __/ | | | / __/ | |_| |
6 /_/\_\___|_| |_| |_____(_)___/
8 ###############################
10 University of Cambridge Computer Laboratory
11 3 November 2004
13 http://www.cl.cam.ac.uk/netos/xen/
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 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 ./install.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, netbsd and freebsd kernel source trees are in
101 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.