ia64/xen-unstable

changeset 2646:d1d3b5fb3145

bitkeeper revision 1.1159.1.237 (416fed81UkPp5K9vS2bNjHY8o66RWg)

Merge ssh://srg//auto/groups/xeno/BK/xeno-unstable.bk
into equilibrium.research:/home/irchomes/mwilli2/xeno-docs.bk
author mwilli2@equilibrium.research
date Fri Oct 15 15:32:17 2004 +0000 (2004-10-15)
parents 18effb096694 b7b618fa83d2
children 4c9db2750868 db9510b8c982
files docs/user.tex
line diff
     1.1 --- a/docs/user.tex	Fri Oct 15 15:14:07 2004 +0000
     1.2 +++ b/docs/user.tex	Fri Oct 15 15:32:17 2004 +0000
     1.3 @@ -1346,5 +1346,157 @@ Although there is no specific user suppo
     1.4  assist users who post on xen-devel.  As the bulk of traffic on this
     1.5  list increases, a dedicated user support list may be introduced.
     1.6  
     1.7 +\appendix
     1.8 +
     1.9 +\chapter{Installing Debian}
    1.10 +
    1.11 +The Debian project provides a tool called {\tt debootstrap} which
    1.12 +allows a base Debian system to be installed into a filesystem without
    1.13 +requiring the host system to have any Debian-specific software (such
    1.14 +as {\tt apt}).
    1.15 +
    1.16 +Here's some info how to install Debian 3.1 (Sarge) for an unprivileged
    1.17 +Xen domain:
    1.18 +
    1.19 +\begin{enumerate}
    1.20 +\item Set up Xen 2.0 and test that it's working, as described earlier in
    1.21 +      this manual.
    1.22 +
    1.23 +\item Create disk images for root-fs and swap (alternatively, you might create
    1.24 +      dedicated partitions, LVM logical volumes, etc. if that suits your setup).
    1.25 +\begin{verbatim}  
    1.26 +dd if=/dev/zero of=/path/diskimage bs=1024k count=size_in_mbytes
    1.27 +dd if=/dev/zero of=/path/swapimage bs=1024k count=size_in_mbytes
    1.28 +\end{verbatim}
    1.29 +      If you're going to use this filesystem / diskimage only as a `template' for
    1.30 +      other vm diskimages, something like 300 MB should be enough.. (of course it 
    1.31 +      depends what kind of packages you are planning to install to the template)
    1.32 +
    1.33 +\item Create filesystem and swap to the images
    1.34 +\begin{verbatim}
    1.35 +mkfs.ext3 /path/diskimage
    1.36 +mkswap /path/swapimage
    1.37 +\end{verbatim}
    1.38 +
    1.39 +\item Mount the diskimage for installation
    1.40 +\begin{verbatim}
    1.41 +mount -o loop /path/diskimage /mnt/disk
    1.42 +\end{verbatim}
    1.43 +
    1.44 +\item Install {\tt debootstrap}
    1.45 +
    1.46 +Make sure you have debootstrap installed on the host. If you are
    1.47 +running Debian sarge (3.1 / testing) or unstable you can install it by
    1.48 +running {\tt apt-get install debootstrap}.  Otherwise, it can be
    1.49 +downloaded from the Debian project website.
    1.50 +
    1.51 +\item Install debian base to the diskimage:
    1.52 +\begin{verbatim}
    1.53 +debootstrap --arch i386 sarge /mnt/disk  \
    1.54 +            http://ftp.<countrycode>.debian.org/debian
    1.55 +\end{verbatim}
    1.56 +
    1.57 +You can use any other Debian http/ftp mirror you want.
    1.58 +
    1.59 +\item When debootstrap completes successfully, modify settings:
    1.60 +\begin{verbatim}
    1.61 +chroot /mnt/disk /bin/bash
    1.62 +\end{verbatim}
    1.63 +
    1.64 +Edit the following files using vi or nano and make needed settings:
    1.65 +\begin{verbatim}
    1.66 +/etc/hostname
    1.67 +/etc/hosts
    1.68 +/etc/resolv.conf
    1.69 +/etc/network/interfaces
    1.70 +/etc/networks
    1.71 +\end{verbatim}
    1.72 +
    1.73 +Set up access to the services, edit:
    1.74 +\begin{verbatim}
    1.75 +/etc/hosts.deny
    1.76 +/etc/hosts.allow
    1.77 +/etc/inetd.conf
    1.78 +\end{verbatim}
    1.79 +
    1.80 +Add Debian mirror to:   
    1.81 +\begin{verbatim}
    1.82 +/etc/apt/sources.list
    1.83 +\end{verbatim}
    1.84 +
    1.85 +And create fstab like this:
    1.86 +\begin{verbatim}
    1.87 +/dev/sda1       /       ext3    errors=remount-ro       0       1
    1.88 +/dev/sda2       none    swap    sw                      0       0
    1.89 +proc            /proc   proc    defaults                0       0
    1.90 +\end{verbatim}
    1.91 +
    1.92 +Logout
    1.93 +
    1.94 +\item      Umount the diskimage
    1.95 +\begin{verbatim}
    1.96 +umount /mnt/disk
    1.97 +\end{verbatim}
    1.98 +
    1.99 +\item      Create Xen 2.0 configuration file for the new domain. You can use the
   1.100 +        example-configurations coming with xen as a template.
   1.101 +
   1.102 +        Make sure you have the following set up:
   1.103 +\begin{verbatim}
   1.104 +disk = [ 'file:/path/diskimage,sda1,w', 'file:/path/swapimage,sda2,w' ]
   1.105 +root = "/dev/sda1 ro"
   1.106 +\end{verbatim}
   1.107 +
   1.108 +\item Start the new domain
   1.109 +\begin{verbatim}
   1.110 +xm create -f domain_config_file
   1.111 +\end{verbatim}
   1.112 +
   1.113 +Check that the new domain is running:
   1.114 +\begin{verbatim}
   1.115 +xm list
   1.116 +\end{verbatim}
   1.117 +
   1.118 +\item   Attach to the console of the new domain.
   1.119 +        You should see something like this when starting the new domain:
   1.120 +
   1.121 +\begin{verbatim}
   1.122 +Started domain testdomain2, console on port 9626
   1.123 +\end{verbatim}
   1.124 +        
   1.125 +        There you can see the ID of the console: 26. You can also
   1.126 +        list the consoles with {\tt xm consoles"}. (ID is the last two digits of
   1.127 +        the portnumber.)
   1.128 +
   1.129 +        Attach to the console:
   1.130 +
   1.131 +\begin{verbatim}
   1.132 +xm console 26
   1.133 +\end{verbatim}
   1.134 +
   1.135 +        or by telnetting to the port 9626 of localhost (the xm console progam works better).
   1.136 +
   1.137 +\item   Log in and run base-config
   1.138 +
   1.139 +        As a default there's no password for the root.
   1.140 +
   1.141 +        Check that everything looks OK, and the system started without
   1.142 +        errors. Check that the swap is active, and the network settings are
   1.143 +        correct.
   1.144 +
   1.145 +        Run {\tt /usr/sbin/base-config} to set up the Debian settings.
   1.146 +
   1.147 +        Set up the password for root using passwd.
   1.148 +
   1.149 +\item     Done. You can exit the console by pressing {\tt Ctrl + ]}
   1.150 +
   1.151 +\end{enumerate}
   1.152 +
   1.153 +If you need to create new domains, you can just copy the contents of
   1.154 +the `template'-image to the new disk images, either by mounting the
   1.155 +template and the new image, and using {\tt cp -a} or {\tt tar} or by
   1.156 +simply copying the image file.  Once this is done, modify the
   1.157 +image-specific settings (hostname, network settings, etc).
   1.158 +
   1.159  \end{document}
   1.160