1###################################
2__  __            _  _    _ _  _
3\ \/ /___ _ __   | || |  / | || |
4 \  // _ \ '_ \  | || |_ | | || |_
5 /  \  __/ | | | |__   _|| |__   _|
6/_/\_\___|_| |_|    |_|(_)_|  |_|
7
8###################################
9
10https://www.xen.org/
11
12What is Xen?
13============
14
15Xen is a Virtual Machine Monitor (VMM) originally developed by the
16Systems Research Group of the University of Cambridge Computer
17Laboratory, as part of the UK-EPSRC funded XenoServers project.  Xen
18is freely-distributable Open Source software, released under the GNU
19GPL. Since its initial public release, Xen has grown a large
20development community, spearheaded by xen.org (https://www.xen.org).
21
22This file contains some quick-start instructions to install Xen on
23your system. For more information see https://www.xen.org/ and
24https://wiki.xen.org/
25
26Quick-Start Guide
27=================
28
29First, this is just a quick-start guide. For more comprehensive
30information see the INSTALL file and the Xen wiki at
31https://wiki.xenproject.org and in particular
32https://wiki.xenproject.org/wiki/Getting_Started.
33
34Second, there are a number of prerequisites for building a Xen source
35release. Make sure you have all the following installed, either by
36visiting the project webpage or installing a pre-built package
37provided by your OS distributor:
38    * GNU Make v3.80 or later
39    * C compiler and linker:
40      - For x86:
41        - GCC 4.1.2_20070115 or later
42        - GNU Binutils 2.16.91.0.5 or later
43        or
44        - Clang/LLVM 3.5 or later
45      - For ARM:
46        - GCC 4.8 or later
47        - GNU Binutils 2.24 or later
48    * Development install of zlib (e.g., zlib-dev)
49    * Development install of Python 2.6 or later (e.g., python-dev)
50    * Development install of curses (e.g., libncurses-dev)
51    * Development install of openssl (e.g., openssl-dev)
52    * Development install of x11 (e.g. xorg-x11-dev)
53    * Development install of uuid (e.g. uuid-dev)
54    * Development install of yajl (e.g. libyajl-dev)
55    * Development install of libaio (e.g. libaio-dev) version 0.3.107 or
56      greater.
57    * Development install of GLib v2.0 (e.g. libglib2.0-dev)
58    * Development install of Pixman (e.g. libpixman-1-dev)
59    * pkg-config
60    * bridge-utils package (/sbin/brctl)
61    * iproute package (/sbin/ip)
62    * GNU bison and GNU flex
63    * GNU gettext
64    * ACPI ASL compiler (iasl)
65    * Libc multiarch package (e.g. libc6-dev-i386 / glibc-devel.i686).
66      Required when building on a 64-bit platform to build
67      32-bit components which are enabled on a default build.
68
69In addition to the above there are a number of optional build
70prerequisites. Omitting these will cause the related features to be
71disabled at compile time:
72    * Development install of Ocaml (e.g. ocaml-nox and
73      ocaml-findlib). Required to build ocaml components which
74      includes the alternative ocaml xenstored.
75    * cmake (if building vtpm stub domains)
76    * pandoc, transfig, pod2{man,html,text} for rendering various pieces of
77      documentation into alternative formats
78    * figlet (for generating the traditional Xen start of day banner)
79    * systemd daemon development files
80    * Development install of libnl3 (e.g., libnl-3-200,
81      libnl-3-dev, etc).  Required if network buffering is desired
82      when using Remus with libxl.  See docs/README.remus for detailed
83      information.
84    * 16-bit x86 assembler, loader and compiler for qemu-traditional / rombios
85      (dev86 rpm or bin86 & bcc debs)
86    * Development install of liblzma for rombios
87
88Second, you need to acquire a suitable kernel for use in domain 0. If
89possible you should use a kernel provided by your OS distributor. If
90no suitable kernel is available from your OS distributor then refer to
91https://wiki.xen.org/wiki/XenDom0Kernels for suggestions for
92suitable kernels to use.
93If you are looking to compile a Dom0 kernel from source, please refer to
94https://wiki.xen.org/wiki/XenParavirtOps.
95
96[NB. Unless noted otherwise, all the following steps should be
97performed with root privileges.]
98
991. Download and untar the source tarball file. This will be a
100   file named xen-unstable-src.tgz, or xen-$version-src.tgz.
101   You can also pull the current version from the git or mercurial
102   repositories at https://xenbits.xen.org/
103
104    # tar xzf xen-unstable-src.tgz
105
106   Assuming you are using the unstable tree, this will
107   untar into xen-unstable. The rest of the instructions
108   use the unstable tree as an example, substitute the
109   version for unstable.
110
1112. cd to xen-unstable (or whatever you sensibly rename it to).
112
1133. For the very first build, or if you want to destroy build trees,
114   perform the following steps:
115
116    # ./configure
117    # make world
118    # make install
119
120   See the documentation in the INSTALL file for more info.
121
122   This will create and install onto the local machine. It will build
123   the xen binary (xen.gz), the tools and the documentation.
124
125   You can override the destination for make install by setting DESTDIR
126   to some value.
127
1284. To rebuild an existing tree without modifying the config:
129    # make dist
130
131   This will build and install xen, tools, and docs into the local dist/
132   directory.
133
134   You can override the destination for make install by setting DISTDIR
135   to some value.
136
137   make install and make dist differ in that make install does the
138   right things for your local machine (installing the appropriate
139   version of udev scripts, for example), but make dist includes all
140   versions of those scripts, so that you can copy the dist directory
141   to another machine and install from that distribution.
142
143xenstore: xenstored and oxenstored
144====================================
145
146Xen uses a configuration database called xenstore [0] to maintain configuration
147and status information shared between domains. A daemon is implemented as part
148of xenstore to act as an interface for access to the database for dom0 and
149guests. Two xenstored daemons are supported, one written in C which we refer
150to as the xenstored (sometimes referred to as cxenstored), and another written
151in Ocaml called oxenstored. Details for xenstore and the different
152implementations can be found on the wiki's xenstore reference guide [1] and
153the xenstored [2] page. You can choose which xenstore you want to enable as
154default on a system through configure:
155
156        ./configure --with-xenstored=xenstored
157        ./configure --with-xenstored=oxenstored
158
159By default oxenstored will be used if the ocaml development tools are found.
160If you enable oxenstored the xenstored will still be built and installed,
161the xenstored used can be changed through the configuration file:
162
163/etc/sysconfig/xencommons
164or
165/etc/default/xencommons
166
167You can change the preferred xenstored you want to use in the configuration
168but since we cannot stop the daemon a reboot will be required to make the
169change take effect.
170
171[0] https://wiki.xen.org/wiki/XenStore
172[1] https://wiki.xen.org/wiki/XenStoreReference
173[2] https://wiki.xen.org/wiki/Xenstored
174
175Python Runtime Libraries
176========================
177
178Various tools, such as pygrub, have the following runtime dependencies:
179
180    * Python 2.6 or later.
181          URL:    http://www.python.org/
182          Debian: python
183
184Note that the build system expects `python` to be available. If your system
185only has `python2` or `python3` but not `python` (as in Linux From Scratch),
186you will need to create a symlink for it, or specify PYTHON= when invoking
187make, like (note the position of PYTHON= matters):
188
189    # make PYTHON=/usr/bin/python3
190
191Intel(R) Trusted Execution Technology Support
192=============================================
193
194Intel's technology for safer computing, Intel(R) Trusted Execution Technology
195(Intel(R) TXT), defines platform-level enhancements that provide the building
196blocks for creating trusted platforms.  For more information, see
197http://www.intel.com/technology/security/.
198
199Intel(R) TXT support is provided by the Trusted Boot (tboot) module in
200conjunction with minimal logic in the Xen hypervisor.
201
202Tboot is an open source, pre- kernel/VMM module that uses Intel(R) TXT to
203perform a measured and verified launch of an OS kernel/VMM.
204
205The Trusted Boot module is available from
206http://sourceforge.net/projects/tboot.  This project hosts the code in a
207mercurial repo at http://tboot.sourceforge.net/hg/tboot.hg and contains
208tarballs of the source.  Instructions in the tboot README describe how
209to modify grub.conf to use tboot to launch Xen.
210