aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/user/debian.tex
blob: 94f3773abd536c484f060dff577f06d94489d088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
\chapter{Installing Xen/XenLinux on Debian}

This appendix describes installing Xen 3.0 on Debian Linux.

Xen can be installed on Debian GNU/Linux using the following methods:

\begin{itemize}
\item From a binary tarball
\item From source 
\item From debs
\end{itemize}

\section{Installing from a binary tarball}
This section describes the process of installing Xen on Debian Sarge using the stable binary release tarball.

\subsection{Required Packages}
Install these Debian packages:

\begin{itemize}
\item bridge-utils
\item libcurl3-dev
\item iproute
\item zlib1g-dev
\item python-dev
\end{itemize}

\begin{verbatim}
apt-get install bridge-utils   libcurl3-dev iproute  zlib1g-dev python-dev
\end{verbatim}


\subsection{Download the binary tarball}
Download the Xen 3.0 binary tarball from the XenSource downloads
page:

\begin{quote} {\tt http://www.xensource.com/downloads/}
\end{quote}
 
\subsection{Extract and Install}
\begin{verbatim}
#  tar zxvf 
xen-2.0.7-install-x86_32.tgz
# cd xen-2.0.7-install-x86_32.tgz
# ./install.sh
\end{verbatim}

If everything goes well, you should something like

\begin{verbatim}
Installing Xen from 
'./install' to '/'...
    All done.
    Checking to see whether prerequisite tools are installed...
    All done.
\end{verbatim}


\subsection{Configure grub}
Make an entry in your grub configuration like below.

{\small
\begin{verbatim}
title          Xen on Debian
kernel         (hd0,5)/boot/xen.gz dom0_mem=131000
module         (hd0,5)/boot/vmlinuz-2.6-xen0 root=/dex/hda6 ro console=tty0
\end{verbatim}
}

You can now boot into Xen by by choosing the right option from grub menu.

\section{Installing from source}
\subsection{Required Packages}
Besides packages mentioned under binary tarball install, you will need:

\begin{itemize}
\item gcc v3.2.x or v3.3.x
\item binutils
\item GNU make
\end{itemize}


\subsection{Download the source tree}
The Xen source tree is available as either a compressed source tarball
or as a clone of our master Mercurial repository.

\begin{description}
\item[Obtaining the Source Tarball]\mbox{} \\
  Stable versions and daily snapshots of the Xen source tree are
  available from the Xen download page:
  \begin{quote} {\tt http://www.xensource.com/downloads/}
  \end{quote}
\item[Obtaining the source via Mercurial]\mbox{} \\
  The source tree may also be obtained via the public Mercurial
  repository hosted at:
  \begin{quote}{\tt http://xenbits.xensource.com}.
  \end{quote} See the instructions and the Getting Started Guide
  referenced at:
  \begin{quote}
    {\tt http://www.xensource.com/downloads/}.
  \end{quote}
\end{description}

\subsection{Extract, build and install}

\begin{verbatim}
# tar zxvf xen-3.0.0-src.tgz
# cd xen-3.0
# make dist
#./install.sh
\end{verbatim}

\section{Installing from debs}
This section describes the process of installing Xen on Debian Sarge using debs created by Edward Despard.

\subsection{Edward's announcement to xen-user list}
"For part of my Google Summer of Code work I've put together debs for xen of 2.0.7 and of unstable. The unstable debs are built off of yesterday's hg tree, but I try to update them fairly regularly when new developments occur." 

\subsection{Adding apt source}
Add the following lines to \path{/etc/apt/sources.list}:

\begin{quote}
{\small
\begin{verbatim}
deb http://tinyurl.com/8tpup
\end{verbatim}
}
\end{quote}
   
Note: On Ubuntu, simple replace debian with ubuntu in the above. Replace xen-unstable with with xen-stable for a stable version.

Now run \path{aptitude update} or \path{apt-get update}. Doing \path{apt-cache search xen}, you should see following packages in the output.

\begin{itemize}
\item kernel-image-2.6.12-xen0 - Xen 2.6 kernel image
\item kernel-image-2.6.12-xenu - Xen 2.6 kernel image
\item kernel-patch-xen-2.6.12 - patch to kernel to support xen
\item libxen3.0 - control libraries for Xen
\item libxen-dev - development libraries for Xen
\item xen-doc - documentation for Xen
\item xen-hypervisor - Xen hypervisor kernel
\item xen-kernels - Xen kernels
\item xen - Package to install all of Xen
\item xen-tools - Tools for managing xen domains
\end{itemize}

\subsection{Installing Xen}
You can now install xen using \path{apt-get}, \path{aptitude}, \path{synaptic}, etc. 
 
After doing \path{apt-get install xen}, you will have a working dom0 and should be able boot into it without any problem. By doing \path{apt-cache depends xen}, you will find that the following packages were also installed as a result of dependency.

\begin{verbatim}
#  apt-cache  
depends  xen
       xen
           Depends: xen-doc
           Depends: xen-kernels
           Depends: xen-hypervisor
           Depends: xen-tools
\end{verbatim}


\subsection{xenkernels.conf}
To automate grub entry for xen, \path{/etc/xenkernels.conf} is used which is installed when the package in installed. Below is a sample entry

\begin{verbatim}
label=Xen(3.0-unstable082205)/Linux(2.6.12)--
          xen=/boot/xen-3.0-unstable082205.gz
          kernel=/boot/xen/dom0/vmlinuz-2.6.12-xen0
          mem=256000
          root=/dev/hda4
\end{verbatim}

You have to run run \path{update-grub-xen} every time \path{xenkernels.conf} is modified. Read \path{man update-grub-xen} for more information.