diff options
author | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2003-09-28 23:16:36 +0000 |
---|---|---|
committer | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2003-09-28 23:16:36 +0000 |
commit | 8d624bc811ff45418f7b7d1c0c2c22820b2591b0 (patch) | |
tree | c26476f347ad0b6b301d315fc82c83dfbc8d7c5f | |
parent | e4e329b0a0fa994d63c5b37aab42871c875f7863 (diff) | |
download | xen-8d624bc811ff45418f7b7d1c0c2c22820b2591b0.tar.gz xen-8d624bc811ff45418f7b7d1c0c2c22820b2591b0.tar.bz2 xen-8d624bc811ff45418f7b7d1c0c2c22820b2591b0.zip |
bitkeeper revision 1.468 (3f776bd43_wFRTwYlSu5A4qtJST5zw)
changes to build system, example config scripts added, READMEs improved.
-rw-r--r-- | .rootkeys | 11 | ||||
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | README | 30 | ||||
-rw-r--r-- | README.CD | 25 | ||||
-rw-r--r-- | tools/Makefile | 37 | ||||
-rw-r--r-- | tools/control/Makefile | 6 | ||||
-rw-r--r-- | tools/control/examples/grub.conf-example | 48 | ||||
-rw-r--r-- | tools/control/examples/xen-mynewdom | 3 | ||||
-rw-r--r-- | tools/control/examples/xenctl.xml | 17 | ||||
-rw-r--r-- | tools/control/examples/xenctl.xml-dom0nfs | 17 | ||||
-rw-r--r-- | tools/control/examples/xenctl.xml-linklocal | 17 | ||||
-rw-r--r-- | tools/control/examples/xenctl.xml-publicip | 17 | ||||
-rw-r--r-- | tools/control/xenctl.xml | 16 | ||||
-rw-r--r-- | tools/misc/Makefile | 30 | ||||
-rw-r--r-- | tools/misc/miniterm/Makefile | 5 | ||||
-rwxr-xr-x | tools/misc/xen-clone | 10 | ||||
-rwxr-xr-x | tools/misc/xen-mkdevnodes (renamed from tools/misc/mkdevnodes) | 2 |
17 files changed, 253 insertions, 51 deletions
@@ -6,6 +6,7 @@ 3f5ef5a24IaQasQE2tyMxrfxskMmvw README 3f5ef5a2l4kfBYSQTUaOyyD76WROZQ README.CD 3f69d8abYB1vMyD_QVDvzxy5Zscf1A TODO +3f776bd1Hy9rn69ntXBhPReUFw9IEA tools/Makefile 3e6377b24eQqYMsDi9XrFkIgTzZ47A tools/balloon/Makefile 3e6377d6eiFjF1hHIS6JEIOFk62xSA tools/balloon/README 3e6377dbGcgnisKw16DPCaND7oGO3Q tools/balloon/balloon.c @@ -16,6 +17,12 @@ 3f0d61da3O5gkcntbIOdUmN2-RcZbQ tools/control/doc/INSTALL-cmdline 3eca6a96a31IwaKtkEa4jmzwTWlm8Q tools/control/doc/INSTALL-web 3f0d61daCTHGCpQK0Brz3PAp80d_2Q tools/control/doc/USAGE-cmdline +3f776bd12y6bW-wtcs6rD2qhdpT_Rw tools/control/examples/grub.conf-example +3f776bd1RBu7Gnce6Bq9328QFUZBsw tools/control/examples/xen-mynewdom +3eb781fcabCKRogwxJA3-jJKstw9Vg tools/control/examples/xenctl.xml +3f776bd1bfwM-pP6b2qd0vih1KeV8w tools/control/examples/xenctl.xml-dom0nfs +3f776bd1-A4vvCCsz-KOgZyAj4ux2g tools/control/examples/xenctl.xml-linklocal +3f776bd2y1sfPGpfiaj4A-sRdUON7A tools/control/examples/xenctl.xml-publicip 3f042c35FzVap5QW0UBPnZ2ZM0l3QA tools/control/src/org/xenoserver/cmdline/CommandParser.java 3eb781fdNQvEJW3tNvovjqoN7GlePA tools/control/src/org/xenoserver/cmdline/Main.java 3f042c35-TPgpCQViIaJzLts2-CnBw tools/control/src/org/xenoserver/cmdline/ParseDomainDestroy.java @@ -123,7 +130,6 @@ 3ec41f7ek1RffqN2yRUzSTkD5m1J6w tools/control/web/tmpl/xenohead.def 3ec41f7e1ZpfCsgQ2qRJBooBn_iRtA tools/control/web/tmpl/xenostyle.css 3eb781fc6vgq5yhkJRGDLY9gWWRY2A tools/control/xenctl -3eb781fcabCKRogwxJA3-jJKstw9Vg tools/control/xenctl.xml 3eb781fdl4lXWYZzmqDDUAYhAThRqQ tools/internal/Makefile 3eb781fdc539MQQm47rYRCCR3N5i-Q tools/internal/dom0_defs.h 3eb781fdKiQbgozBsgs_zzJQ9ubehw tools/internal/mem_defs.h @@ -142,12 +148,13 @@ 3eb781fd0Eo9K1jEFCSAVzO51i_ngg tools/internal/xi_stop.c 3f108ae2to5nHRRXfvUK7oxgjcW_yA tools/internal/xi_usage.c 3eb781fd7211MZsLxJSiuy7W4KnJXg tools/internal/xi_vifinit +3f776bd2Xd-dUcPKlPN2vG89VGtfvQ tools/misc/Makefile 3f6dc136ZKOjd8PIqLbFBl_v-rnkGg tools/misc/miniterm/Makefile 3f6dc140C8tAeBfroAF24VrmCS4v_w tools/misc/miniterm/README 3f6dc142IHaf6XIcAYGmhV9nNSIHFQ tools/misc/miniterm/miniterm.c -3f1668d4-FUY6Enc7MB3GcwUtfJ5HA tools/misc/mkdevnodes 3f5ef5a2ir1kVAthS14Dc5QIRCEFWg tools/misc/xen-clone 3f5ef5a2dTZP0nnsFoeq2jRf3mWDDg tools/misc/xen-clone.README +3f1668d4-FUY6Enc7MB3GcwUtfJ5HA tools/misc/xen-mkdevnodes 3f13d81eQ9Vz-h-6RDGFkNR9CRP95g tools/misc/xen_nat_enable 3f13d81e6Z6806ihYYUw8GVKNkYnuw tools/misc/xen_nat_enable.README 3f1668d4F29Jsw0aC0bJEIkOBiagiQ tools/misc/xen_read_console.c @@ -19,20 +19,13 @@ all: $(MAKE) -C xen - $(MAKE) -C tools/balloon - $(MAKE) -C tools/control - $(MAKE) -C tools/internal + $(MAKE) -C tools install: all $(MAKE) -C xen install - $(MAKE) -C tools/balloon install - $(MAKE) -C tools/control install - $(MAKE) -C tools/internal install - + $(MAKE) -C tools install clean: $(MAKE) -C xen clean - $(MAKE) -C tools/balloon clean - $(MAKE) -C tools/control clean - $(MAKE) -C tools/internal clean + $(MAKE) -C tools clean @@ -98,7 +98,6 @@ We've successfully booted over 128 copies of Linux on the same machine more normal to use some smaller number, perhaps 10-20. - Hardware support ================ @@ -135,14 +134,29 @@ recommended since they require extra packet copies. Building Xen and XenoLinux ========================== -Take a look at the tools/misc/xen-clone script in the BK repository, -which will 'bk clone' the live master tree, and then set about -building everything. The build procedure for xenolinux is slightly -complicated as its done by running the 'mkbuildtree' script over -a pristine Linux tree to turn it into a xenolinux tree by adding the -'xeno' architecture. +The public master BK repository lives at: bk://xen.bkbits.net/xeno.bk + +To fetch a local copy, install the BitKeeper tools, then run: +'bk clone bk://xen.bkbits.net/xeno.bk' + +To see how to build Xen, Xenolinux, and all the control tools, inspect +the tools/misc/xen-clone script in the BK repository. This script can +be used to clone the repostitory and perform a full build. + +The build procedure for xenolinux is slightly complicated as its done +by running the 'mkbuildtree' script over a pristine Linux tree to turn +it into a xenolinux tree by adding the 'xeno' architecture. + +There's also a pre-built source tree on the project downloads page. + + +Using the domain control tools +============================== -The public master BK repository lives at: bk://xen.bkbits.net/xeno.bk +The README.CD file contains some examples of how to use 'xenctl' and +the other domain control tools. Invoking the tool without any +arguments prints some usage inforamtion. There's also some +documentation in the the repository under tools/control/doc @@ -89,10 +89,15 @@ via ssh:: password: xendemo xendemo Once logged in, it should look just like any regular linux box. All -the usual tools and commands should work as per usual. It's probably -best to start by configuring networking, either with 'dhclient' or -manually via ifconfig and route, remembering to edit /etc/resolv.conf -if you want DNS. +the usual tools and commands should work as per usual. However, +because of the poor random access performance of CD drives, the +machine will feel rather slugish, and you may run out of memory if you +make significant modifications to the ramfs filesystem -- for the full +experience, install a Xen and XenoLinux image on you hard drive :-) + +You can configure networking, either with 'dhclient' or manually via +'ifconfig' and 'route', remembering to edit /etc/resolv.conf if you +want DNS. You can start an X server with 'startx'. It defaults to a conservative 1024x768, but you can edit the script for higher resoloutions. The CD @@ -242,7 +247,7 @@ Alternatively, you can use 'virtual disks', which are stored as files within a custom file system. "xenctl partitions add" can be used to 'format' a partition with the file system, and then virtual disks can be created with "xenctl vd create". Virtual disks can then be attached -to a running domain as a 'virtual block device' using "xenctl vdb +to a running domain as a 'virtual block device' using "xenctl vbd create". The virtual disk can optionally be partitioned (e.g. "fdisk /dev/xvda") or have a file system created on it directly (e.g. "mkfs -t ext3 /dev/xvda"). The virtual disk can then be accessed by a @@ -329,7 +334,7 @@ xen-devel@lists.sourceforge.net mailing list. Installing from the CD ----------------------- +====================== If you're installing Xen/XenoLinux onto an existing linux file system distribution, just copy the Xen VMM (/boot/image.gz) and XenoLinux @@ -373,7 +378,7 @@ require a second "module" line. Installing the file systems from the CD ---------------------------------------- +======================================= If you haven't an existing Linux installation onto which you can just drop down the Xen and XenoLinux images, then the file systems on the @@ -411,7 +416,7 @@ version of the XenDemoCD (see below). Debugging ---------- +========= Xen has a set of debugging features that can be useful to try and figure out what's going on. Hit 'h' on the serial line (if you @@ -432,7 +437,7 @@ connected to a serial-port server. Description of how the XenDemoCD boots --------------------------------------- +====================================== 1. Grub is used to load Xen, a XenoLinux kernel, and an initrd (initial ram disk). [The source of the version of Grub used is in /usr/local/src] @@ -456,7 +461,7 @@ normally. Building your own version of the XenDemoCD ------------------------------------------- +========================================== The 'live ISO' version of RedHat is based heavily on Peter Anvin's SuperRescue CD version 2.1.2 and J. McDaniel's Plan-B: diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 0000000000..590d8ca21b --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,37 @@ +# +# Grand Unified Makefile for Xen. +# +# Keir Fraser, 6/5/2003 +# +# Builds everything except Xenolinux: +# cd xenolinux-<version>-sparse +# ./mkbuildtree <build dir> +# cd <build dir> && make oldconfig && make dep && make bzImage +# (<build dir> should be a vanilla linux tree with matching version) +# +# If you get errors in tools/domctl or tools/vdmanager, then you need +# the latest Java 2 SDK on your execution path: <http://java.sun.com> +# Also, you will need Apache's 'ant' build tool: <http://ant.apache.org> +# +# If you received this source as part of a Xen release, you should find +# that appropriate versions of the build tools are already installed in +# the initial system setup. + +all: + $(MAKE) -C balloon + $(MAKE) -C control + $(MAKE) -C internal + $(MAKE) -C misc + +install: all + $(MAKE) -C balloon install + $(MAKE) -C control install + $(MAKE) -C internal install + $(MAKE) -C misc install + +clean: + $(MAKE) -C balloon clean + $(MAKE) -C control clean + $(MAKE) -C internal clean + $(MAKE) -C misc clean + diff --git a/tools/control/Makefile b/tools/control/Makefile index 0c2ca8e10e..1086f47ddb 100644 --- a/tools/control/Makefile +++ b/tools/control/Makefile @@ -2,11 +2,13 @@ default: cmdline #install: install-cmdline install-web -install: install-cmdline +install: install-cmdline examples clean: clean-cmdline clean-web - +examples: FORCE + mkdir -p ../../../install/etc + cp examples/xen* examples/grub.conf* ../../../install/etc/ cmdline: FORCE ant -buildfile build-cmdline.xml dist diff --git a/tools/control/examples/grub.conf-example b/tools/control/examples/grub.conf-example new file mode 100644 index 0000000000..0f9cd7a613 --- /dev/null +++ b/tools/control/examples/grub.conf-example @@ -0,0 +1,48 @@ +# grub.conf +# +timeout=10 + +# We can control GRUB via COM1. +# Disable by default as it hangs on systems without a serial port and +# doesn't work with slpashimage enabled anyhow. +# +# serial --unit=0 --speed=115200 +# terminal --timeout=10 serial console + +# These examples are from the Xen Demo CD, so the root filesystem setup +# using an initrd to mount the read only /usr is all rather non standard. +# There are arguably more normal examples in the README.CD file. Read +# the standard Linux documenation to find out about kernel cmd line +# parameters. + +# The two lots of console= parameters cause the domain 0 Linux to use both +# the VGA scree consoles and the Xen output-only console + +# We also make use of the ability to pass arbitrary environment variables +# on the kernel command line, so set the DOMID variable. + +splashimage=/boot/grub/splash.xpm.gz + +default=0 + +title Xen / XenoLinux 2.4.22 + kernel /boot/image.gz dom0_mem=100000 + module /boot/xenolinux.gz root=/dev/ram0 rw init=/linuxrc console=xencons0 console=tty0 DOMID=0 + module /boot/initrd.gz + +title Xen / XenoLinux 2.4.22 w/ cmdline IP config -- edit as required + kernel /boot/image.gz dom0_mem=100000 + module /boot/xenolinux.gz ip=192.168.5.5::192.168.0.1:255.255.0.0::eth0:off root=/dev/ram0 rw init=/linuxrc console=xencons0 console=tty0 DOMID=0 + module /boot/initrd.gz + +title Xen / XenoLinux 2.4.22 in "safe mode" + kernel /boot/image.gz ignorebiostables watchdog dom0_mem=100000 + module /boot/xenolinux.gz root=/dev/ram0 rw init=/linuxrc console=xencons0 console=tty0 DOMID=0 + module /boot/initrd.gz + + +title Linux 2.4.22 + kernel /boot/vmlinuz-2.4.22 root=/dev/ram0 rw init=/linuxrc + initrd /boot/initrd.gz + + diff --git a/tools/control/examples/xen-mynewdom b/tools/control/examples/xen-mynewdom new file mode 100644 index 0000000000..009a584e6e --- /dev/null +++ b/tools/control/examples/xen-mynewdom @@ -0,0 +1,3 @@ +domain new +physical grant -pcdrom_link +domain start diff --git a/tools/control/examples/xenctl.xml b/tools/control/examples/xenctl.xml new file mode 100644 index 0000000000..6f1ed1e185 --- /dev/null +++ b/tools/control/examples/xenctl.xml @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<domctl_defaults> +<domain_name>XenoLinux</domain_name> +<domain_size_kb>98304</domain_size_kb> +<domain_image>/boot/xenolinux.gz</domain_image> +<domain_vifs>1</domain_vifs> +<domain_init_rd>/boot/initrd.gz</domain_init_rd> +<root_device>/dev/ram0</root_device> +<root_args>rw</root_args> +<args>init=/linuxrc 4 DOMID=+</args> +<nw_ip>169.254.1.0+</nw_ip> +<nw_gw>169.254.1.0</nw_gw> +<nw_mask>255.255.0.0</nw_mask> +<nw_nfs_server>169.254.1.0</nw_nfs_server> +<max_domain_number>1000</max_domain_number> +<xi_tools_dir>/usr/local/bin/</xi_tools_dir> +</domctl_defaults> diff --git a/tools/control/examples/xenctl.xml-dom0nfs b/tools/control/examples/xenctl.xml-dom0nfs new file mode 100644 index 0000000000..547ca862c2 --- /dev/null +++ b/tools/control/examples/xenctl.xml-dom0nfs @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<domctl_defaults> +<domain_name>XenoLinux</domain_name> +<domain_size_kb>98304</domain_size_kb> +<domain_image>/boot/xenolinux.gz</domain_image> +<domain_vifs>1</domain_vifs> +<root_device>/dev/nfs</root_device> +<root_args>rw</root_args> +<args>init=/linuxrc 4 DOMID=+</args> +<nw_ip>169.254.1.0+</nw_ip> +<nw_gw>169.254.1.0</nw_gw> +<nw_mask>255.255.0.0</nw_mask> +<nw_nfs_server>169.254.1.0</nw_nfs_server> +<nw_nfs_root>169.254.1.0:/local/roots/root+</nw_nfs_root> +<max_domain_number>1000</max_domain_number> +<xi_tools_dir>/usr/local/bin/</xi_tools_dir> +</domctl_defaults> diff --git a/tools/control/examples/xenctl.xml-linklocal b/tools/control/examples/xenctl.xml-linklocal new file mode 100644 index 0000000000..6f1ed1e185 --- /dev/null +++ b/tools/control/examples/xenctl.xml-linklocal @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<domctl_defaults> +<domain_name>XenoLinux</domain_name> +<domain_size_kb>98304</domain_size_kb> +<domain_image>/boot/xenolinux.gz</domain_image> +<domain_vifs>1</domain_vifs> +<domain_init_rd>/boot/initrd.gz</domain_init_rd> +<root_device>/dev/ram0</root_device> +<root_args>rw</root_args> +<args>init=/linuxrc 4 DOMID=+</args> +<nw_ip>169.254.1.0+</nw_ip> +<nw_gw>169.254.1.0</nw_gw> +<nw_mask>255.255.0.0</nw_mask> +<nw_nfs_server>169.254.1.0</nw_nfs_server> +<max_domain_number>1000</max_domain_number> +<xi_tools_dir>/usr/local/bin/</xi_tools_dir> +</domctl_defaults> diff --git a/tools/control/examples/xenctl.xml-publicip b/tools/control/examples/xenctl.xml-publicip new file mode 100644 index 0000000000..fa78a847b1 --- /dev/null +++ b/tools/control/examples/xenctl.xml-publicip @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<domctl_defaults> +<domain_name>XenoLinux</domain_name> +<domain_size_kb>98304</domain_size_kb> +<domain_image>/boot/xenolinux.gz</domain_image> +<domain_vifs>1</domain_vifs> +<domain_init_rd>/boot/initrd.gz</domain_init_rd> +<root_device>/dev/ram0</root_device> +<root_args>rw</root_args> +<args>init=/linuxrc 4 DOMID=+</args> +<nw_ip>=+</nw_ip> +<nw_gw>=</nw_gw> +<nw_mask>=</nw_mask> +<nw_nfs_server>169.254.1.0</nw_nfs_server> +<max_domain_number>10</max_domain_number> +<xi_tools_dir>/usr/local/bin/</xi_tools_dir> +</domctl_defaults> diff --git a/tools/control/xenctl.xml b/tools/control/xenctl.xml deleted file mode 100644 index 1d86847d50..0000000000 --- a/tools/control/xenctl.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0"?> -<domctl_defaults> -<xi_tools_dir>/usr/local/bin/</xi_tools_dir> -<domain_name>XenoLinux</domain_name> -<domain_size_kb>16000</domain_size_kb> -<domain_image>./image</domain_image> -<domain_vifs>1</domain_vifs> -<root_device>/dev/nfs</root_device> -<root_args>ro</root_args> -<nw_ip>=+</nw_ip> -<nw_gw>=</nw_gw> -<nw_mask>=</nw_mask> -<nw_nfs_server>128.232.32.20</nw_nfs_server> -<nw_nfs_root>/usr/groups/srgboot/moonraider/roots/root+</nw_nfs_root> -<max_domain_number>10</max_domain_number> -</domctl_defaults> diff --git a/tools/misc/Makefile b/tools/misc/Makefile new file mode 100644 index 0000000000..62e1ab7fee --- /dev/null +++ b/tools/misc/Makefile @@ -0,0 +1,30 @@ + +CC = gcc +CFLAGS = -Wall -O3 +CFLAGS += -I../../xen/include -I../../xenolinux-sparse/include + +HDRS = $(wildcard *.h) +SRCS = $(wildcard *.c) +OBJS = $(patsubst %.c,%.o,$(SRCS)) + +TARGETS = xen_read_console + +INSTALL = $(TARGETS) xen-mkdevnodes xen-clone + +all: $(TARGETS) + $(MAKE) -C miniterm + +install: all + mkdir -p ../../../install/bin + cp -a $(INSTALL) ../../../install/bin + chmod 755 ../../../install/bin/xen-mkdevnodes + chmod 755 ../../../install/bin/xen-clone + $(MAKE) -C miniterm install + +clean: + $(RM) *.o $(TARGETS) + $(MAKE) -C miniterm clean + +%: %.c $(HDRS) Makefile + $(CC) $(CFLAGS) -o $@ $< + diff --git a/tools/misc/miniterm/Makefile b/tools/misc/miniterm/Makefile index 945ce33593..59fd0a17bf 100644 --- a/tools/misc/miniterm/Makefile +++ b/tools/misc/miniterm/Makefile @@ -3,5 +3,8 @@ CFLAGS = -O3 -march=i686 -Wall all: miniterm +install: all + cp -a miniterm ../../../../install/bin/ + clean: - rm -f *.o miniterm *~
\ No newline at end of file + rm -f *.o miniterm *~ diff --git a/tools/misc/xen-clone b/tools/misc/xen-clone index 8e54ca64b2..724873b496 100755 --- a/tools/misc/xen-clone +++ b/tools/misc/xen-clone @@ -50,13 +50,23 @@ UCCL) esac # clone the master repository (now checked-out by default) +if [ ! -d ${DEST_BK_REP} ] +then bk clone ${BK_REP} ${DEST_BK_REP} +else +cd ${DEST_BK_REP} +bk pull +cd ${TOP} +fi # identify this version of linux LINUX_VER=`/bin/ls -ld ${DEST_BK_REP}/xenolinux-sparse | sed -e 's!^.*xenolinux-\([0-9.]\+\)-sparse!\1!'` # copy in the master Linux tree for this kernel +if [ ! -d linux-${LINUX_VER} ] +then tar -zxf ${LINUX_DIR}/linux-${LINUX_VER}.tar.gz || tar -zxf ${LINUX_DIR}/linux-${LINUX_VER}.tgz || cp -a ${LINUX_DIR}/linux-${LINUX_VER} . || wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${LINUX_VER}.tar.gz -O- | tar -zxf - || exit -1 +fi # build and install Xen and tools cd ${DEST_BK_REP} diff --git a/tools/misc/mkdevnodes b/tools/misc/xen-mkdevnodes index c29208fa6a..37c94de872 100755 --- a/tools/misc/mkdevnodes +++ b/tools/misc/xen-mkdevnodes @@ -2,8 +2,6 @@ BASE=${1:?"base directory missing (eg. /dev)"} -rm -f ${BASE}/xhd[abcdefghijklmnop]* -rm -f ${BASE}/xsd[abcdefghijklmnop]* rm -f ${BASE}/xvd[abcdefghijklmnop]* # XLVIRT is 16 devices of 15 partitions |