keir@16275: ################################# keir@19603: __ __ _____ _ _ keir@19603: \ \/ /___ _ __ |___ /| || | keir@19603: \ // _ \ '_ \ |_ \| || |_ keir@19603: / \ __/ | | | ___) |__ _| keir@19603: /_/\_\___|_| |_| |____(_) |_| keir@18288: keir@16275: ################################# cl349@9840: keir@16275: http://www.xen.org/ cl349@9840: cl349@9840: What is Xen? cl349@9840: ============ cl349@9840: cl349@9840: Xen is a Virtual Machine Monitor (VMM) originally developed by the cl349@9840: Systems Research Group of the University of Cambridge Computer cl349@9840: Laboratory, as part of the UK-EPSRC funded XenoServers project. Xen cl349@9840: is freely-distributable Open Source software, released under the GNU cl349@9840: GPL. Since its initial public release, Xen has grown a large cl349@9840: development community, spearheaded by XenSource Inc, a company created cl349@9840: by the original Xen development team to build enterprise products cl349@9840: around Xen. cl349@9840: keir@19603: The 3.4 release offers excellent performance, hardware support and cl349@9840: enterprise-grade features such as x86_32-PAE, x86_64, SMP guests and keir@17555: live relocation of VMs. Ports to Linux 2.6, Linux 2.4, NetBSD, FreeBSD keir@17555: and Solaris are available from the community. cl349@9840: cl349@9840: This file contains some quick-start instructions to install Xen on cl349@9840: your system. For full documentation, see the Xen User Manual. If this cl349@9840: is a pre-built release then you can find the manual at: cl349@9840: dist/install/usr/share/doc/xen/pdf/user.pdf cl349@9840: If you have a source release, then 'make -C docs' will build the cl349@9840: manual at docs/pdf/user.pdf. cl349@9840: cl349@9840: Quick-Start Guide - Pre-Built Binary Release cl349@9840: ============================================ cl349@9840: cl349@9840: [NB. Unless noted otherwise, all the following steps should be cl349@9840: performed with root privileges.] cl349@9840: cl349@9840: 1. Install the binary distribution onto your filesystem: cl349@9840: cl349@9840: # sh ./install.sh cl349@9840: cl349@9840: Among other things, this will install Xen and Xen-ready Linux cl349@9840: kernel files in /boot, kernel modules and Python packages in /lib, cl349@9840: and various control tools in standard 'bin' directories. cl349@9840: cl349@9840: 2. Configure your bootloader to boot Xen and an initial Linux virtual cl349@9840: machine. Note that Xen currently only works with GRUB and pxelinux cl349@9840: derived boot loaders: less common alternatives such as LILO are cl349@9840: *not* supported. You can most likely find your GRUB menu file at cl349@9840: /boot/grub/menu.lst: edit this file to include an entry like the cl349@9840: following: cl349@9840: keir@19603: title Xen 3.4 / XenLinux 2.6 keir@19603: kernel /boot/xen-3.4.gz console=vga cl349@9840: module /boot/vmlinuz-2.6-xen root= ro console=tty0 cl349@9840: module /boot/initrd-2.6-xen.img cl349@9840: cl349@9840: NB: Not all kernel configs need an initial ram disk (initrd), but cl349@9840: if you do specify one you'll need to use the 'module' grub directive cl349@9840: rather than 'initrd'. cl349@9840: cl349@9840: The linux command line takes all the usual options, such as cl349@9840: root= to specify your usual root partition (e.g., kaf24@10068: /dev/hda1). cl349@9840: cl349@9840: The Xen command line takes a number of optional arguments described cl349@9840: in the manual. The most common is 'dom0_mem=xxxM' which sets the cl349@9840: amount of memory to allocate for use by your initial virtual cl349@9840: machine (known as domain 0). Note that Xen itself reserves about cl349@9840: 32MB memory for internal use, which is not available for allocation kaf24@10068: to virtual machines. cl349@9840: keir@19603: 3. Reboot your system and select the "Xen 3.4 / XenLinux 2.6" menu cl349@9840: option. After booting Xen, Linux will start and your initialisation cl349@9840: scripts should execute in the usual way. cl349@9840: cl349@9840: Quick-Start Guide - Source Release cl349@9840: ================================== cl349@9840: cl349@9840: First, there are a number of prerequisites for building a Xen source cl349@9840: release. Make sure you have all the following installed, either by cl349@9840: visiting the project webpage or installing a pre-built package cl349@9840: provided by your Linux distributor: kfraser@14883: * GCC v3.4 or later cl349@9840: * GNU Make cl349@9840: * GNU Binutils cl349@9840: * Development install of zlib (e.g., zlib-dev) cl349@9840: * Development install of Python v2.3 or later (e.g., python-dev) kfraser@10797: * Development install of curses (e.g., libncurses-dev) kfraser@14168: * Development install of openssl (e.g., openssl-dev) kfraser@14168: * Development install of x11 (e.g. xorg-x11-dev) cl349@9840: * bridge-utils package (/sbin/brctl) cl349@9840: * iproute package (/sbin/ip) cl349@9840: * hotplug or udev cl349@9840: cl349@9840: [NB. Unless noted otherwise, all the following steps should be cl349@9840: performed with root privileges.] cl349@9840: cl349@9840: 1. Download and untar the source tarball file. This will be a cl349@9840: file named xen-unstable-src.tgz, or xen-$version-src.tgz. kfraser@15291: You can also pull the current version from the mercurial kfraser@15291: repository at http://xenbits.xensource.com/ cl349@9840: cl349@9840: # tar xzf xen-unstable-src.tgz cl349@9840: cl349@9840: Assuming you are using the unstable tree, this will cl349@9840: untar into xen-unstable. The rest of the instructions cl349@9840: use the unstable tree as an example, substitute the cl349@9840: version for unstable. cl349@9840: cl349@9840: 2. cd to xen-unstable (or whatever you sensibly rename it to). cl349@9840: cl349@9840: On Linux: cl349@9840: cl349@9840: 3. For the very first build, or if you want to destroy existing cl349@9840: .configs and build trees, perform the following steps: cl349@9840: cl349@9840: # make world cl349@9840: # make install cl349@9840: kaf24@10068: This will create and install onto the local machine. It will build cl349@9840: the xen binary (xen.gz), and a linux kernel and modules that can be cl349@9840: used in both dom0 and an unprivileged guest kernel (vmlinuz-2.6.x-xen), cl349@9840: the tools and the documentation. cl349@9840: kaf24@10068: You can override the destination for make install by setting DESTDIR cl349@9840: to some value. cl349@9840: kaf24@10068: The make command line defaults to building the kernel vmlinuz-2.6.x-xen. kaf24@10068: You can override this default by specifying KERNELS=kernelname. For kaf24@10068: example, you can make two kernels - linux-2.6-xen0 kaf24@10068: and linux-2.6-xenU - which are smaller builds containing only selected kaf24@10068: modules, intended primarily for developers that don't like to wait cl349@9840: for a full -xen kernel to build. The -xenU kernel is particularly small, cl349@9840: as it does not contain any physical device drivers, and hence is cl349@9840: only useful for guest domains. cl349@9840: cl349@9840: To make these two kernels, simply specify cl349@9840: cl349@9840: KERNELS="linux-2.6-xen0 linux-2.6-xenU" cl349@9840: cl349@9840: in the make command line. cl349@9840: cl349@9840: 4. To rebuild an existing tree without modifying the config: cl349@9840: # make dist cl349@9840: cl349@9840: This will build and install xen, kernels, tools, and kaf24@10068: docs into the local dist/ directory. cl349@9840: kaf24@10068: You can override the destination for make install by setting DISTDIR cl349@9840: to some value. cl349@9840: kaf24@10068: make install and make dist differ in that make install does the kaf24@10068: right things for your local machine (installing the appropriate kaf24@10068: version of hotplug or udev scripts, for example), but make dist kaf24@10068: includes all versions of those scripts, so that you can copy the dist cl349@9840: directory to another machine and install from that distribution. cl349@9840: cl349@9840: 5. To rebuild a kernel with a modified config: cl349@9840: cl349@9840: # make linux-2.6-xen-config CONFIGMODE=menuconfig (or xconfig) cl349@9840: # make linux-2.6-xen-build cl349@9840: # make linux-2.6-xen-install cl349@9840: cl349@9840: Depending on your config, you may need to use 'mkinitrd' to create kaf24@10068: an initial ram disk, just like a native system e.g. kfraser@15291: # depmod 2.6.18-xen kfraser@15291: # mkinitrd -v -f --with=aacraid --with=sd_mod --with=scsi_mod initrd-2.6.18-xen.img 2.6.18-xen kfraser@15291: kfraser@15291: Other systems may requires the use of 'mkinitramfs' to create the kfraser@15291: ram disk. kfraser@15291: # depmod 2.6.18-xen kfraser@15291: # mkinitramfs -o initrd-2.6.18-xen.img 2.6.18-xen ewan@14706: ewan@14706: ewan@14706: Python Runtime Libraries ewan@14706: ======================== ewan@14706: ewan@14706: Xend (the Xen daemon) has the following runtime dependencies: ewan@14706: ewan@14706: * Python 2.3 or later. ewan@14706: In many distros, the XML-aspects to the standard library ewan@14706: (xml.dom.minidom etc) are broken out into a separate python-xml package. ewan@14706: This is also required. ewan@14706: ewan@14706: URL: http://www.python.org/ ewan@14706: Debian: python, python-xml ewan@14706: ewan@14706: * For optional SSL support, pyOpenSSL: ewan@14706: URL: http://pyopenssl.sourceforge.net/ ewan@14706: Debian: python-pyopenssl ewan@14706: ewan@14706: * For optional PAM support, PyPAM: ewan@14706: URL: http://www.pangalactic.org/PyPAM/ ewan@14706: Debian: python-pam tom@14833: tom@14833: * For optional XenAPI support in XM, PyXML: tom@14833: URL: http://pyxml.sourceforge.net tom@14833: YUM: PyXML keir@16275: keir@16275: keir@16275: Intel(R) Trusted Execution Technology Support keir@16275: ============================================= keir@16275: keir@16275: Intel's technology for safer computing, Intel(R) Trusted Execution Technology keir@16275: (Intel(R) TXT), defines platform-level enhancements that provide the building keir@16275: blocks for creating trusted platforms. For more information, see keir@16275: http://www.intel.com/technology/security/. keir@16275: keir@16275: Intel(R) TXT support is provided by the Trusted Boot (tboot) module in keir@16275: conjunction with minimal logic in the Xen hypervisor. keir@16275: keir@16275: Tboot is an open source, pre- kernel/VMM module that uses Intel(R) TXT to keir@16275: perform a measured and verified launch of an OS kernel/VMM. keir@16275: keir@16275: The Trusted Boot module is available from keir@16275: http://sourceforge.net/projects/tboot. This project hosts the code in a keir@16275: mercurial repo at http://tboot.sourceforge.net/hg/tboot.hg and contains keir@16275: tarballs of the source. Instructions in the tboot README describe how keir@16275: to modify grub.conf to use tboot to launch Xen. keir@16275: keir@16275: There are optional targets as part of Xen's top-level makefile that will keir@18249: download and build tboot: install-tboot, build-tboot, dist-tboot, clean-tboot. keir@16275: These will download the latest tar file from the SourceForge site using wget, keir@16275: then build/install/dist according to Xen's settings.