ia64/xen-unstable

changeset 1064:cdc8a05cc2af

bitkeeper revision 1.703 (402105d6e4VSwz9ZtpK4acDDq4h0lg)

Updated HOWTO for 1.2
author br260@laudney.cl.cam.ac.uk
date Wed Feb 04 14:46:46 2004 +0000 (2004-02-04)
parents 2dcb5a482b05
children 9acedaeb47e2
files .rootkeys docs/Xeno-1.1-HOWTO.txt docs/Xeno-1.2-HOWTO.txt docs/Xeno-HOWTO
line diff
     1.1 --- a/.rootkeys	Tue Feb 03 19:21:37 2004 +0000
     1.2 +++ b/.rootkeys	Wed Feb 04 14:46:46 2004 +0000
     1.3 @@ -8,7 +8,8 @@ 3f5ef5a2l4kfBYSQTUaOyyD76WROZQ README.CD
     1.4  3f69d8abYB1vMyD_QVDvzxy5Zscf1A TODO
     1.5  3f9e7d53iC47UnlfORp9iC1vai6kWw docs/Makefile
     1.6  40083bb4LVQzRqA3ABz0__pPhGNwtA docs/VBD-HOWTO.txt
     1.7 -3fafbf11blCNItRsHe0UHwyu5CCDkw docs/Xeno-HOWTO
     1.8 +3fafbf11blCNItRsHe0UHwyu5CCDkw docs/Xeno-1.1-HOWTO.txt
     1.9 +4021053fmeFrEyPHcT8JFiDpLNgtHQ docs/Xeno-1.2-HOWTO.txt
    1.10  3f9e7d60PWZJeVh5xdnk0nLUdxlqEA docs/eps/xenlogo.eps
    1.11  3f9e7d63lTwQbp2fnx7yY93epWS-eQ docs/figs/dummy
    1.12  3f9e7d564bWFB-Czjv1qdmE6o0GqNg docs/interface.tex
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/docs/Xeno-1.1-HOWTO.txt	Wed Feb 04 14:46:46 2004 +0000
     2.3 @@ -0,0 +1,252 @@
     2.4 +###########################################
     2.5 +Xeno HOWTO
     2.6 +
     2.7 +University of Cambridge Computer Laboratory
     2.8 +
     2.9 +http://www.cl.cam.ac.uk/netos/xen
    2.10 +#############################
    2.11 +
    2.12 +
    2.13 +Get Xeno Source Codes
    2.14 +==========================
    2.15 +
    2.16 +The public master BK repository for the 1.1 release lives at:
    2.17 +'bk://xen.bkbits.net/xeno-1.1.bk'
    2.18 +
    2.19 +To fetch a local copy, first download the BitKeeper tools at:
    2.20 +http://www.bitmover.com/download with username 'bitkeeper' and
    2.21 +password 'get bitkeeper'.
    2.22 +
    2.23 +Then install the tools and then run:
    2.24 +# bk clone bk://xen.bkbits.net/xeno-1.1.bk
    2.25 +
    2.26 +Under your current directory, a new directory named 'xeno-1.1.bk' has
    2.27 +been created, which contains all the source codes for Xen and
    2.28 +XenoLinux. 
    2.29 +
    2.30 +To get newest changes to the repository, run
    2.31 +# cd xeno-1.1.bk
    2.32 +# bk pull
    2.33 +
    2.34 +
    2.35 +Build Xen
    2.36 +=============================
    2.37 +
    2.38 +Hint: To see how to build Xen and all the control tools, inspect the
    2.39 +tools/misc/xen-clone script in the BK repository. This script can be
    2.40 +used to clone the repostitory and perform a full build.
    2.41 +
    2.42 +To build Xen manually:
    2.43 +
    2.44 +# cd xeno-1.1.bk/xen
    2.45 +# make clean
    2.46 +# make
    2.47 +
    2.48 +This will (should) produce a file called 'image' in the current
    2.49 +directory.  This is the ELF 32-bit LSB executable file of Xen.  You
    2.50 +can also find a gzip version, named 'image.gz'.
    2.51 +
    2.52 +To install the built files on your Xenoserver under /usr, type 'make
    2.53 +install' at the root of the BK repository. You will need to be root to
    2.54 +do this!
    2.55 +
    2.56 +Hint: There is also a 'make dist' rule which copies built files to an
    2.57 +install directory just outside the BK repo; if this suits your setup,
    2.58 +go for it.
    2.59 +
    2.60 +
    2.61 +Build XenoLinux
    2.62 +==============================
    2.63 +
    2.64 +This is a little more involved since the repository only contains a
    2.65 +"sparse" tree -- this is essentially an 'overlay' on a standard linux
    2.66 +kernel source tree. It contains only those files currently 'in play'
    2.67 +which are either modified versions of files in the vanilla linux tree,
    2.68 +or brand new files specific to XenoLinux.
    2.69 +
    2.70 +So, first you need a vanilla linux-2.4.22 tree, which is located at:
    2.71 +http://www.kernel.org/pub/linux/kernel/v2.4
    2.72 +
    2.73 +Then:
    2.74 +  # mv linux-2.4.22.tar.gz /xeno-1.1.bk
    2.75 +  # cd /xeno-1.1.bk
    2.76 +  # tar -zxvf linux-2.4.22.tar.gz
    2.77 +
    2.78 +You'll find a new directory 'linux-2.4.22' which contains all
    2.79 +the vanilla Linux 2.4.22 kernel source codes.
    2.80 +
    2.81 +Hint: You should choose the vanilla linux kernel tree that has the
    2.82 +same version as the "sparse" tree.
    2.83 +
    2.84 +Next, you need to 'overlay' this sparse tree on the full vanilla Linux
    2.85 +kernel tree:
    2.86 +
    2.87 +  # cd /xeno-1.1.bk/xenolinux-2.4.22-sparse
    2.88 +  # ./mkbuildtree ../linux-2.4.22
    2.89 +
    2.90 +Finally, rename the buildtree since it is now a xenolinux buildtree. 
    2.91 +
    2.92 +  # cd /xeno-1.1.bk
    2.93 +  # mv linux-2.4.22 xenolinux-2.4.22
    2.94 +
    2.95 +Now that the buildtree is there, you can build the xenolinux kernel. 
    2.96 +
    2.97 +  # cd /xeno-1.1.bk/xenolinux-2.4.22
    2.98 +  # ARCH=xeno make xconfig   { or menuconfig, or oldconfig, or config }  
    2.99 +  # ARCH=xeno make dep bzImage
   2.100 +
   2.101 +Assuming the build works, you'll end up with
   2.102 +/xeno-1.1.bk/xenolinux-2.4.22/arch/xeno/boot/image.gz
   2.103 +This is the gzip version of XenoLinux kernel image.
   2.104 +
   2.105 +
   2.106 +Build the Domain Control Tools
   2.107 +==============================
   2.108 +
   2.109 +Under '/xeno-1.1.bk/tools', there are three sub-directories:
   2.110 +'balloon', 'xc' and 'misc', each containing
   2.111 +a group of tools. You can enter any of the four sub-directories
   2.112 +and type 'make' to compile the corresponding group of tools.
   2.113 +Or you can type 'make' under '/xeno-1.1.bk/tools' to compile
   2.114 +all the tools.
   2.115 +
   2.116 +In order to compile the control-interface library in 'xc' you must
   2.117 +have zlib and devlopment headers installed. Also you will need at
   2.118 +least Python v2.2. 
   2.119 +
   2.120 +'make install' in the tools directory will place executables and
   2.121 +libraries in /usr/bin and /usr/lib. You will need to be root to do this!
   2.122 +
   2.123 +As noted earlier, 'make dist' installs files to a local 'install'
   2.124 +directory just outside the BK repository. These files will then need
   2.125 +to be installed manually onto the Xenoserver.
   2.126 +
   2.127 +
   2.128 +Installation
   2.129 +==============================
   2.130 +
   2.131 +First:
   2.132 +# cp /xen-1.1.bk/xen/image.gz /boot/xen.gz
   2.133 +# cp /xen-1.1.bk/xenolinux-2.4.22/arch/xeno/boot/image.gz /boot/xenolinux.gz
   2.134 +
   2.135 +Second, you must have 'GNU Grub' installed. Then you need to edit
   2.136 +the Grub configuration file '/boot/grub/menu.lst'.
   2.137 +
   2.138 +A typical Grub menu option might look like:
   2.139 +
   2.140 +title Xen / XenoLinux 2.4.22
   2.141 +        kernel /boot/xen.gz dom0_mem=131072 ser_baud=115200 noht
   2.142 +        module /boot/xenolinux.gz root=/dev/sda4 ro console=tty0
   2.143 +
   2.144 +The first line specifies which Xen image to use, and what command line
   2.145 +arguments to pass to Xen. In this case we set the maximum amount of
   2.146 +memory to allocate to domain0, and enable serial I/O at 115200 baud.
   2.147 +We could also disable smp support (nosmp) or disable hyper-threading
   2.148 +support (noht). If you have multiple network interface you can use
   2.149 +ifname=ethXX to select which one to use. If your network card is
   2.150 +unsupported, use ifname=dummy
   2.151 +
   2.152 +The second line specifies which XenoLinux image to use, and the
   2.153 +standard linux command line arguments to pass to the kernel. In this
   2.154 +case, we're configuring the root partition and stating that it should
   2.155 +be mounted read-only (normal practice). 
   2.156 +
   2.157 +The following is a list of command line arguments to pass to Xen:
   2.158 +
   2.159 + ignorebiostables Disable parsing of BIOS-supplied tables. This may
   2.160 +                  help with some chipsets that aren't fully supported
   2.161 +                  by Xen. If you specify this option then ACPI tables are
   2.162 +                  also ignored, and SMP support is disabled.
   2.163 +
   2.164 + noreboot         Don't reboot the machine automatically on errors.
   2.165 +                  This is useful to catch debug output if you aren't
   2.166 +                  catching console messages via the serial line.
   2.167 +
   2.168 + nosmp            Disable SMP support.
   2.169 +                  This option is implied by 'ignorebiostables'.
   2.170 +
   2.171 + noacpi           Disable ACPI tables, which confuse Xen on some chipsets.
   2.172 +                  This option is implied by 'ignorebiostables'.
   2.173 +
   2.174 + watchdog         Enable NMI watchdog which can report certain failures.
   2.175 +
   2.176 + noht             Disable Hyperthreading.
   2.177 +
   2.178 + ifname=ethXX     Select which Ethernet interface to use.
   2.179 +
   2.180 + ifname=dummy     Don't use any network interface.
   2.181 +
   2.182 + ser_baud=xxx     Enable serial I/O and set the baud rate.
   2.183 +
   2.184 + dom0_mem=xxx     Set the maximum amount of memory for domain0.
   2.185 +
   2.186 +
   2.187 +Boot into Domain 0
   2.188 +==============================
   2.189 +
   2.190 +Reboot your computer; After selecting the kernel to boot, stand back
   2.191 +and watch Xen boot, closely followed by "domain 0" running the
   2.192 +XenoLinux kernel.  Depending on which root partition you have assigned
   2.193 +to XenoLinux kernel in Grub configuration file, you can use the
   2.194 +corresponding username / password to log in.
   2.195 +
   2.196 +Once logged in, it should look just like any regular linux box. All
   2.197 +the usual tools and commands should work as per usual.
   2.198 +
   2.199 +
   2.200 +Start New Domains
   2.201 +==============================
   2.202 +
   2.203 +You must be 'root' to start new domains.
   2.204 +
   2.205 +Make sure you have successfully configured at least one
   2.206 +physical network interface. Then:
   2.207 +
   2.208 +# xen_nat_enable
   2.209 +# xen_read_console &
   2.210 +
   2.211 +When new  domains are created and  started, they will  send output via
   2.212 +UDP packets to  the local virtual network. Those  packets are received
   2.213 +by xen_read_console running in Domain  0 and output are printed out to
   2.214 +the standard output.
   2.215 +
   2.216 +Now edit the tools/examples/createlinuxdom.py script to your taste. This
   2.217 +should then be executed as root to create a new domain.
   2.218 +
   2.219 +You should be able to see XenoLinux boot message on standard output
   2.220 +with each line prepended with [domain_id].
   2.221 +
   2.222 +
   2.223 +List and Stop Domains
   2.224 +==============================
   2.225 +
   2.226 +You can see a list of existing domains with:
   2.227 +# tools/examples/listdoms.py
   2.228 +
   2.229 +In order to stop a domain, you use:
   2.230 +# tools/examples/stopdom.py <domain_id>
   2.231 +
   2.232 +To destroy a domain use ('force' causes an immediate destruction
   2.233 +without waiting for the guest OS to shut down cleanly):
   2.234 +# tools/examples/destroydom.py <domain_id> [force]
   2.235 +
   2.236 +
   2.237 +Other Control Tasks using Python
   2.238 +================================
   2.239 +
   2.240 +A Python module 'Xc' is installed as part of the tools-install
   2.241 +process. This can be imported, and an 'xc object' instantiated, to
   2.242 +provide access to privileged command operations:
   2.243 +
   2.244 +# import Xc
   2.245 +# xc = Xc.new()
   2.246 +# dir(xc)
   2.247 +# help(xc.domain_create)
   2.248 +
   2.249 +In this way you can see that the class 'xc' contains useful
   2.250 +documentation for you to consult.
   2.251 +
   2.252 +A further module of useful routines (XenoUtil) is also installed:
   2.253 +
   2.254 +# import XenoUtil
   2.255 +# help(XenoUtil)
   2.256 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/docs/Xeno-1.2-HOWTO.txt	Wed Feb 04 14:46:46 2004 +0000
     3.3 @@ -0,0 +1,321 @@
     3.4 +###########################################
     3.5 +Xeno HOWTO
     3.6 +
     3.7 +University of Cambridge Computer Laboratory
     3.8 +
     3.9 +http://www.cl.cam.ac.uk/netos/xen
    3.10 +#############################
    3.11 +
    3.12 +
    3.13 +Get Xeno Source Codes
    3.14 +==========================
    3.15 +
    3.16 +The public master BK repository for the 1.2 release lives at:
    3.17 +'bk://xen.bkbits.net/xeno-1.2.bk'
    3.18 +
    3.19 +To fetch a local copy, first download the BitKeeper tools at:
    3.20 +http://www.bitmover.com/download with username 'bitkeeper' and
    3.21 +password 'get bitkeeper'.
    3.22 +
    3.23 +Then install the tools and then run:
    3.24 +# bk clone bk://xen.bkbits.net/xeno-1.2.bk
    3.25 +
    3.26 +Under your current directory, a new directory named 'xeno-1.2.bk' has
    3.27 +been created, which contains all the source codes for Xen and
    3.28 +XenoLinux. 
    3.29 +
    3.30 +To get newest changes to the repository, run
    3.31 +# cd xeno-1.2.bk
    3.32 +# bk pull
    3.33 +
    3.34 +
    3.35 +Build Xen
    3.36 +=============================
    3.37 +
    3.38 +Hint: To see how to build Xen and all the control tools, inspect the
    3.39 +tools/misc/xen-clone script in the BK repository. This script can be
    3.40 +used to clone the repository and perform a full build.
    3.41 +
    3.42 +To build Xen manually:
    3.43 +
    3.44 +# cd xeno-1.2.bk/xen
    3.45 +# make clean
    3.46 +# make
    3.47 +
    3.48 +This will (should) produce a file called 'xen' in the current
    3.49 +directory.  This is the ELF 32-bit LSB executable file of Xen.  You
    3.50 +can also find a gzip version, named 'xen.gz'.
    3.51 +
    3.52 +To install the built files on your Xenoserver under /usr, type 'make
    3.53 +install' at the root of the BK repository. You will need to be root to
    3.54 +do this!
    3.55 +
    3.56 +Hint: There is also a 'make dist' rule which copies built files to an
    3.57 +install directory just outside the BK repo; if this suits your setup,
    3.58 +go for it.
    3.59 +
    3.60 +
    3.61 +Build XenoLinux
    3.62 +==============================
    3.63 +
    3.64 +This is a little more involved since the repository only contains a
    3.65 +"sparse" tree -- this is essentially an 'overlay' on a standard linux
    3.66 +kernel source tree. It contains only those files currently 'in play'
    3.67 +which are either modified versions of files in the vanilla linux tree,
    3.68 +or brand new files specific to XenoLinux.
    3.69 +
    3.70 +So, first you need a vanilla linux-2.4.24 tree, which is located at:
    3.71 +http://www.kernel.org/pub/linux/kernel/v2.4
    3.72 +
    3.73 +Then:
    3.74 +  # mv linux-2.4.24.tar.gz /xeno-1.2.bk
    3.75 +  # cd /xeno-1.2.bk
    3.76 +  # tar -zxvf linux-2.4.24.tar.gz
    3.77 +
    3.78 +You'll find a new directory 'linux-2.4.24' which contains all
    3.79 +the vanilla Linux 2.4.24 kernel source codes.
    3.80 +
    3.81 +Hint: You should choose the vanilla linux kernel tree that has the
    3.82 +same version as the "sparse" tree.
    3.83 +
    3.84 +Next, you need to 'overlay' this sparse tree on the full vanilla Linux
    3.85 +kernel tree:
    3.86 +
    3.87 +  # cd /xeno-1.2.bk/xenolinux-2.4.24-sparse
    3.88 +  # ./mkbuildtree ../linux-2.4.24
    3.89 +
    3.90 +Finally, rename the buildtree since it is now a xenolinux buildtree. 
    3.91 +
    3.92 +  # cd /xeno-1.2.bk
    3.93 +  # mv linux-2.4.24 xenolinux-2.4.24
    3.94 +
    3.95 +Now that the buildtree is there, you can build the xenolinux kernel.
    3.96 +The default configuration should work fine for most people (use 'make
    3.97 +oldconfig') but you can customise using one of the other config tools
    3.98 +if you want.
    3.99 +
   3.100 +  # cd /xeno-1.2.bk/xenolinux-2.4.24
   3.101 +  # ARCH=xeno make oldconfig   { or menuconfig, or xconfig, or config }  
   3.102 +  # ARCH=xeno make dep bzImage
   3.103 +
   3.104 +Assuming the build works, you'll end up with
   3.105 +/xeno-1.2.bk/xenolinux-2.4.24/arch/xeno/boot/xenolinux.gz. This is the
   3.106 +gzip version of XenoLinux kernel image.
   3.107 +
   3.108 +
   3.109 +Build the Domain Control Tools
   3.110 +==============================
   3.111 +
   3.112 +Under '/xeno-1.2.bk/tools', there are three sub-directories:
   3.113 +'balloon', 'xc' and 'misc', each containing
   3.114 +a group of tools. You can enter any of the four sub-directories
   3.115 +and type 'make' to compile the corresponding group of tools.
   3.116 +Or you can type 'make' under '/xeno-1.2.bk/tools' to compile
   3.117 +all the tools.
   3.118 +
   3.119 +In order to compile the control-interface library in 'xc' you must
   3.120 +have zlib and development headers installed. Also you will need at
   3.121 +least Python v2.2. 
   3.122 +
   3.123 +'make install' in the tools directory will place executables and
   3.124 +libraries in /usr/bin and /usr/lib. You will need to be root to do this!
   3.125 +
   3.126 +As noted earlier, 'make dist' installs files to a local 'install'
   3.127 +directory just outside the BK repository. These files will then need
   3.128 +to be installed manually onto the Xenoserver.
   3.129 +
   3.130 +The Example Scripts
   3.131 +===================
   3.132 +
   3.133 +The scripts in tools/examples/ are generally useful for
   3.134 +administering a Xen-based system.  You can install them by running
   3.135 +'make install' in that directory.
   3.136 +
   3.137 +The python scripts (*.py) are the main tools for controlling
   3.138 +Xen domains.
   3.139 +
   3.140 +'defaults' and 'democd' are example configuration files for starting
   3.141 +new domains.
   3.142 +
   3.143 +'xendomains' is a Sys-V style init script for starting and stopping
   3.144 +Xen domains when the system boots / shuts down.
   3.145 +
   3.146 +These will be discussed below in more detail.
   3.147 +
   3.148 +
   3.149 +Installation
   3.150 +==============================
   3.151 +
   3.152 +First:
   3.153 +# cp /xen-1.2.bk/xen/xen.gz /boot/xen.gz
   3.154 +# cp /xen-1.2.bk/xenolinux-2.4.24/arch/xeno/boot/xenolinux.gz /boot/xenolinux.gz
   3.155 +
   3.156 +Second, you must have 'GNU Grub' installed. Then you need to edit
   3.157 +the Grub configuration file '/boot/grub/menu.lst'.
   3.158 +
   3.159 +A typical Grub menu option might look like:
   3.160 +
   3.161 +title Xen 1.2 / XenoLinux 2.4.24
   3.162 +        kernel /boot/xen.gz dom0_mem=131072 ser_baud=115200 noht
   3.163 +        module /boot/xenolinux.gz root=/dev/sda4 ro console=tty0
   3.164 +
   3.165 +The first line specifies which Xen image to use, and what command line
   3.166 +arguments to pass to Xen. In this case we set the maximum amount of
   3.167 +memory to allocate to domain0, and enable serial I/O at 115200 baud.
   3.168 +We could also disable smp support (nosmp) or disable hyper-threading
   3.169 +support (noht). If you have multiple network interface you can use
   3.170 +ifname=ethXX to select which one to use. If your network card is
   3.171 +unsupported, use ifname=dummy
   3.172 +
   3.173 +The second line specifies which XenoLinux image to use, and the
   3.174 +standard linux command line arguments to pass to the kernel. In this
   3.175 +case, we're configuring the root partition and stating that it should
   3.176 +(initially) be mounted read-only (normal practice). 
   3.177 +
   3.178 +The following is a list of command line arguments to pass to Xen:
   3.179 +
   3.180 + ignorebiostables Disable parsing of BIOS-supplied tables. This may
   3.181 +                  help with some chipsets that aren't fully supported
   3.182 +                  by Xen. If you specify this option then ACPI tables are
   3.183 +                  also ignored, and SMP support is disabled.
   3.184 +
   3.185 + noreboot         Don't reboot the machine automatically on errors.
   3.186 +                  This is useful to catch debug output if you aren't
   3.187 +                  catching console messages via the serial line.
   3.188 +
   3.189 + nosmp            Disable SMP support.
   3.190 +                  This option is implied by 'ignorebiostables'.
   3.191 +
   3.192 + noacpi           Disable ACPI tables, which confuse Xen on some chipsets.
   3.193 +                  This option is implied by 'ignorebiostables'.
   3.194 +
   3.195 + watchdog         Enable NMI watchdog which can report certain failures.
   3.196 +
   3.197 + noht             Disable Hyperthreading.
   3.198 +
   3.199 + ifname=ethXX     Select which Ethernet interface to use.
   3.200 +
   3.201 + ifname=dummy     Don't use any network interface.
   3.202 +
   3.203 + ser_baud=xxx     Enable serial I/O and set the baud rate.
   3.204 +
   3.205 + dom0_mem=xxx     Set the maximum amount of memory for domain0.
   3.206 +
   3.207 +
   3.208 +Boot into Domain 0
   3.209 +==============================
   3.210 +
   3.211 +Reboot your computer; After selecting the kernel to boot, stand back
   3.212 +and watch Xen boot, closely followed by "domain 0" running the
   3.213 +XenoLinux kernel.  Depending on which root partition you have assigned
   3.214 +to XenoLinux kernel in Grub configuration file, you can use the
   3.215 +corresponding username / password to log in.
   3.216 +
   3.217 +Once logged in, it should look just like any regular linux box. All
   3.218 +the usual tools and commands should work as per usual.
   3.219 +
   3.220 +
   3.221 +Start New Domains
   3.222 +==============================
   3.223 +
   3.224 +You must be 'root' to start new domains.
   3.225 +
   3.226 +Make sure you have successfully configured at least one
   3.227 +physical network interface. Then:
   3.228 +
   3.229 +# xen_nat_enable
   3.230 +# xen_read_console &
   3.231 +
   3.232 +When new  domains are created and  started, they will  send output via
   3.233 +UDP packets to  the local virtual network. Those  packets are received
   3.234 +by xen_read_console running in Domain  0 and output are printed out to
   3.235 +the standard output.
   3.236 +
   3.237 +The xc_dom_create.py program is useful for starting Xen domains.
   3.238 +You can specify configuration files using the -f switch on the command
   3.239 +line.  The default configuration is in /etc/xc/defaults.  You can
   3.240 +create custom versions of this to suit your local configuration.
   3.241 +
   3.242 +You can override the settings in a configuration file using command
   3.243 +line arguments to xc_dom_create.py.  However, you may find it simplest
   3.244 +to create a separate configuration file for each domain you start.
   3.245 +
   3.246 +When you start domains, you should be able to see XenoLinux boot
   3.247 +message on standard output with each line prepended with [domain_id].
   3.248 +
   3.249 +
   3.250 +Manage Running Domains
   3.251 +==============================
   3.252 +
   3.253 +You can see a list of existing domains with:
   3.254 +# xc_dom_control.py list
   3.255 +
   3.256 +In order to stop a domain, you use:
   3.257 +# xc_dom_control.py stop <domain_id>
   3.258 +
   3.259 +To shutdown a domain cleanly use:
   3.260 +# xc_dom_control.py shutdown <domain_id>
   3.261 +
   3.262 +To destroy a domain immediately:
   3.263 +# xc_dom_control.py destroy <domain_id>
   3.264 +
   3.265 +There are other more advanced options, including pinning domains to
   3.266 +specific CPUs and saving / resuming domains to / from disk files.  To
   3.267 +get more information, run the tool without any arguments:
   3.268 +# xc_dom_control.py
   3.269 +
   3.270 +There is more information available in the Xen README files, the
   3.271 +VBD-HOWTO and the contributed FAQ / HOWTO documents on the web.
   3.272 +
   3.273 +
   3.274 +Other Control Tasks using Python
   3.275 +================================
   3.276 +
   3.277 +A Python module 'Xc' is installed as part of the tools-install
   3.278 +process. This can be imported, and an 'xc object' instantiated, to
   3.279 +provide access to privileged command operations:
   3.280 +
   3.281 +# import Xc
   3.282 +# xc = Xc.new()
   3.283 +# dir(xc)
   3.284 +# help(xc.domain_create)
   3.285 +
   3.286 +In this way you can see that the class 'xc' contains useful
   3.287 +documentation for you to consult.
   3.288 +
   3.289 +A further module of useful routines (XenoUtil) is also installed:
   3.290 +
   3.291 +# import XenoUtil
   3.292 +# help(XenoUtil)
   3.293 +
   3.294 +You can use these modules to write your own custom scripts or you can
   3.295 +customise the scripts supplied in the Xen distribution.
   3.296 +
   3.297 +
   3.298 +Automatically start / stop domains at boot / shutdown
   3.299 +=====================================================
   3.300 +
   3.301 +A Sys-V style init script for RedHat systems is provided in
   3.302 +tools/examples/xendomains.  When you run 'make install' in that
   3.303 +directory, it should be automatically copied to /etc/init.d/.  You can
   3.304 +then enable it using the chkconfig command, e.g.:
   3.305 +
   3.306 +# chkconfig --add xendomains
   3.307 +
   3.308 +By default, this will start the boot-time domains in runlevels 3, 4
   3.309 +and 5.  To specify a domain is to start at boot-time, place its
   3.310 +configuration file (or a link to it) under /etc/xc/auto/.
   3.311 +
   3.312 +The script will also stop ALL domains when the system is shut down,
   3.313 +even domains that it did not start originally.
   3.314 +
   3.315 +You can also use the "service" command (part of the RedHat standard
   3.316 +distribution) to run this script manually, e.g:
   3.317 +
   3.318 +# service xendomains start
   3.319 +
   3.320 +Starts all the domains with config files under /etc/xc/auto/.
   3.321 +
   3.322 +# service xendomains stop
   3.323 +
   3.324 +Shuts down ALL running Xen domains.
     4.1 --- a/docs/Xeno-HOWTO	Tue Feb 03 19:21:37 2004 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,252 +0,0 @@
     4.4 -###########################################
     4.5 -Xeno HOWTO
     4.6 -
     4.7 -University of Cambridge Computer Laboratory
     4.8 -
     4.9 -http://www.cl.cam.ac.uk/netos/xen
    4.10 -#############################
    4.11 -
    4.12 -
    4.13 -Get Xeno Source Codes
    4.14 -==========================
    4.15 -
    4.16 -The public master BK repository for the 1.1 release lives at:
    4.17 -'bk://xen.bkbits.net/xeno-1.1.bk'
    4.18 -
    4.19 -To fetch a local copy, first download the BitKeeper tools at:
    4.20 -http://www.bitmover.com/download with username 'bitkeeper' and
    4.21 -password 'get bitkeeper'.
    4.22 -
    4.23 -Then install the tools and then run:
    4.24 -# bk clone bk://xen.bkbits.net/xeno-1.1.bk
    4.25 -
    4.26 -Under your current directory, a new directory named 'xeno-1.1.bk' has
    4.27 -been created, which contains all the source codes for Xen and
    4.28 -XenoLinux. 
    4.29 -
    4.30 -To get newest changes to the repository, run
    4.31 -# cd xeno-1.1.bk
    4.32 -# bk pull
    4.33 -
    4.34 -
    4.35 -Build Xen
    4.36 -=============================
    4.37 -
    4.38 -Hint: To see how to build Xen and all the control tools, inspect the
    4.39 -tools/misc/xen-clone script in the BK repository. This script can be
    4.40 -used to clone the repostitory and perform a full build.
    4.41 -
    4.42 -To build Xen manually:
    4.43 -
    4.44 -# cd xeno-1.1.bk/xen
    4.45 -# make clean
    4.46 -# make
    4.47 -
    4.48 -This will (should) produce a file called 'image' in the current
    4.49 -directory.  This is the ELF 32-bit LSB executable file of Xen.  You
    4.50 -can also find a gzip version, named 'image.gz'.
    4.51 -
    4.52 -To install the built files on your Xenoserver under /usr, type 'make
    4.53 -install' at the root of the BK repository. You will need to be root to
    4.54 -do this!
    4.55 -
    4.56 -Hint: There is also a 'make dist' rule which copies built files to an
    4.57 -install directory just outside the BK repo; if this suits your setup,
    4.58 -go for it.
    4.59 -
    4.60 -
    4.61 -Build XenoLinux
    4.62 -==============================
    4.63 -
    4.64 -This is a little more involved since the repository only contains a
    4.65 -"sparse" tree -- this is essentially an 'overlay' on a standard linux
    4.66 -kernel source tree. It contains only those files currently 'in play'
    4.67 -which are either modified versions of files in the vanilla linux tree,
    4.68 -or brand new files specific to XenoLinux.
    4.69 -
    4.70 -So, first you need a vanilla linux-2.4.22 tree, which is located at:
    4.71 -http://www.kernel.org/pub/linux/kernel/v2.4
    4.72 -
    4.73 -Then:
    4.74 -  # mv linux-2.4.22.tar.gz /xeno-1.1.bk
    4.75 -  # cd /xeno-1.1.bk
    4.76 -  # tar -zxvf linux-2.4.22.tar.gz
    4.77 -
    4.78 -You'll find a new directory 'linux-2.4.22' which contains all
    4.79 -the vanilla Linux 2.4.22 kernel source codes.
    4.80 -
    4.81 -Hint: You should choose the vanilla linux kernel tree that has the
    4.82 -same version as the "sparse" tree.
    4.83 -
    4.84 -Next, you need to 'overlay' this sparse tree on the full vanilla Linux
    4.85 -kernel tree:
    4.86 -
    4.87 -  # cd /xeno-1.1.bk/xenolinux-2.4.22-sparse
    4.88 -  # ./mkbuildtree ../linux-2.4.22
    4.89 -
    4.90 -Finally, rename the buildtree since it is now a xenolinux buildtree. 
    4.91 -
    4.92 -  # cd /xeno-1.1.bk
    4.93 -  # mv linux-2.4.22 xenolinux-2.4.22
    4.94 -
    4.95 -Now that the buildtree is there, you can build the xenolinux kernel. 
    4.96 -
    4.97 -  # cd /xeno-1.1.bk/xenolinux-2.4.22
    4.98 -  # ARCH=xeno make xconfig   { or menuconfig, or oldconfig, or config }  
    4.99 -  # ARCH=xeno make dep bzImage
   4.100 -
   4.101 -Assuming the build works, you'll end up with
   4.102 -/xeno-1.1.bk/xenolinux-2.4.22/arch/xeno/boot/image.gz
   4.103 -This is the gzip version of XenoLinux kernel image.
   4.104 -
   4.105 -
   4.106 -Build the Domain Control Tools
   4.107 -==============================
   4.108 -
   4.109 -Under '/xeno-1.1.bk/tools', there are three sub-directories:
   4.110 -'balloon', 'xc' and 'misc', each containing
   4.111 -a group of tools. You can enter any of the four sub-directories
   4.112 -and type 'make' to compile the corresponding group of tools.
   4.113 -Or you can type 'make' under '/xeno-1.1.bk/tools' to compile
   4.114 -all the tools.
   4.115 -
   4.116 -In order to compile the control-interface library in 'xc' you must
   4.117 -have zlib and devlopment headers installed. Also you will need at
   4.118 -least Python v2.2. 
   4.119 -
   4.120 -'make install' in the tools directory will place executables and
   4.121 -libraries in /usr/bin and /usr/lib. You will need to be root to do this!
   4.122 -
   4.123 -As noted earlier, 'make dist' installs files to a local 'install'
   4.124 -directory just outside the BK repository. These files will then need
   4.125 -to be installed manually onto the Xenoserver.
   4.126 -
   4.127 -
   4.128 -Installation
   4.129 -==============================
   4.130 -
   4.131 -First:
   4.132 -# cp /xen-1.1.bk/xen/image.gz /boot/xen.gz
   4.133 -# cp /xen-1.1.bk/xenolinux-2.4.22/arch/xeno/boot/image.gz /boot/xenolinux.gz
   4.134 -
   4.135 -Second, you must have 'GNU Grub' installed. Then you need to edit
   4.136 -the Grub configuration file '/boot/grub/menu.lst'.
   4.137 -
   4.138 -A typical Grub menu option might look like:
   4.139 -
   4.140 -title Xen / XenoLinux 2.4.22
   4.141 -        kernel /boot/xen.gz dom0_mem=131072 ser_baud=115200 noht
   4.142 -        module /boot/xenolinux.gz root=/dev/sda4 ro console=tty0
   4.143 -
   4.144 -The first line specifies which Xen image to use, and what command line
   4.145 -arguments to pass to Xen. In this case we set the maximum amount of
   4.146 -memory to allocate to domain0, and enable serial I/O at 115200 baud.
   4.147 -We could also disable smp support (nosmp) or disable hyper-threading
   4.148 -support (noht). If you have multiple network interface you can use
   4.149 -ifname=ethXX to select which one to use. If your network card is
   4.150 -unsupported, use ifname=dummy
   4.151 -
   4.152 -The second line specifies which XenoLinux image to use, and the
   4.153 -standard linux command line arguments to pass to the kernel. In this
   4.154 -case, we're configuring the root partition and stating that it should
   4.155 -be mounted read-only (normal practice). 
   4.156 -
   4.157 -The following is a list of command line arguments to pass to Xen:
   4.158 -
   4.159 - ignorebiostables Disable parsing of BIOS-supplied tables. This may
   4.160 -                  help with some chipsets that aren't fully supported
   4.161 -                  by Xen. If you specify this option then ACPI tables are
   4.162 -                  also ignored, and SMP support is disabled.
   4.163 -
   4.164 - noreboot         Don't reboot the machine automatically on errors.
   4.165 -                  This is useful to catch debug output if you aren't
   4.166 -                  catching console messages via the serial line.
   4.167 -
   4.168 - nosmp            Disable SMP support.
   4.169 -                  This option is implied by 'ignorebiostables'.
   4.170 -
   4.171 - noacpi           Disable ACPI tables, which confuse Xen on some chipsets.
   4.172 -                  This option is implied by 'ignorebiostables'.
   4.173 -
   4.174 - watchdog         Enable NMI watchdog which can report certain failures.
   4.175 -
   4.176 - noht             Disable Hyperthreading.
   4.177 -
   4.178 - ifname=ethXX     Select which Ethernet interface to use.
   4.179 -
   4.180 - ifname=dummy     Don't use any network interface.
   4.181 -
   4.182 - ser_baud=xxx     Enable serial I/O and set the baud rate.
   4.183 -
   4.184 - dom0_mem=xxx     Set the maximum amount of memory for domain0.
   4.185 -
   4.186 -
   4.187 -Boot into Domain 0
   4.188 -==============================
   4.189 -
   4.190 -Reboot your computer; After selecting the kernel to boot, stand back
   4.191 -and watch Xen boot, closely followed by "domain 0" running the
   4.192 -XenoLinux kernel.  Depending on which root partition you have assigned
   4.193 -to XenoLinux kernel in Grub configuration file, you can use the
   4.194 -corresponding username / password to log in.
   4.195 -
   4.196 -Once logged in, it should look just like any regular linux box. All
   4.197 -the usual tools and commands should work as per usual.
   4.198 -
   4.199 -
   4.200 -Start New Domains
   4.201 -==============================
   4.202 -
   4.203 -You must be 'root' to start new domains.
   4.204 -
   4.205 -Make sure you have successfully configured at least one
   4.206 -physical network interface. Then:
   4.207 -
   4.208 -# xen_nat_enable
   4.209 -# xen_read_console &
   4.210 -
   4.211 -When new  domains are created and  started, they will  send output via
   4.212 -UDP packets to  the local virtual network. Those  packets are received
   4.213 -by xen_read_console running in Domain  0 and output are printed out to
   4.214 -the standard output.
   4.215 -
   4.216 -Now edit the tools/examples/createlinuxdom.py script to your taste. This
   4.217 -should then be executed as root to create a new domain.
   4.218 -
   4.219 -You should be able to see XenoLinux boot message on standard output
   4.220 -with each line prepended with [domain_id].
   4.221 -
   4.222 -
   4.223 -List and Stop Domains
   4.224 -==============================
   4.225 -
   4.226 -You can see a list of existing domains with:
   4.227 -# tools/examples/listdoms.py
   4.228 -
   4.229 -In order to stop a domain, you use:
   4.230 -# tools/examples/stopdom.py <domain_id>
   4.231 -
   4.232 -To destroy a domain use ('force' causes an immediate destruction
   4.233 -without waiting for the guest OS to shut down cleanly):
   4.234 -# tools/examples/destroydom.py <domain_id> [force]
   4.235 -
   4.236 -
   4.237 -Other Control Tasks using Python
   4.238 -================================
   4.239 -
   4.240 -A Python module 'Xc' is installed as part of the tools-install
   4.241 -process. This can be imported, and an 'xc object' instantiated, to
   4.242 -provide access to privileged command operations:
   4.243 -
   4.244 -# import Xc
   4.245 -# xc = Xc.new()
   4.246 -# dir(xc)
   4.247 -# help(xc.domain_create)
   4.248 -
   4.249 -In this way you can see that the class 'xc' contains useful
   4.250 -documentation for you to consult.
   4.251 -
   4.252 -A further module of useful routines (XenoUtil) is also installed:
   4.253 -
   4.254 -# import XenoUtil
   4.255 -# help(XenoUtil)
   4.256 \ No newline at end of file