Changes between Version 10 and Version 11 of install_debian_xen


Ignore:
Timestamp:
Mar 14, 2008, 10:35:52 AM (11 years ago)
Author:
Daniel Kahn Gillmor
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • install_debian_xen

    v10 v11  
     1[[PageOutline]]
    12= Setup xen =
    23
    3  * Install with (change the version number of xen-linux-system-2.6.18-4-xen-686 to the version you need; also on amd64 machines you don't libc6-xen):
     4How to set up a debian Xen dom0 with the associated hypervisor for a standard May First/People Link server:
    45
     6== Instal the hypervisor ==
     7 * Install with (change the version number of xen-linux-system-2.6.18-6-xen-686 to the version you need; also on amd64 machines you don't libc6-xen):
    58{{{
    6 aptitude install xen-hypervisor xen-linux-system-2.6.18-4-xen-686 libc6-xen
     9aptitude install xen-hypervisor xen-linux-system-2.6.18-6-xen-686 libc6-xen
    710}}}
    8 
    9  * Edit /boot/grub/menu.1st
    10 
     11 * limit the dom0 to 128M of RAM, and make sure both the hypervisor and dom0 kernel use the serial console.  A convenient way to do this on debian is to edit `/boot/grub/menu.lst` so that the following lines are contained within the `AUTOMAGIC KERNELS LIST` section:
    1112{{{
    1213## Xen hypervisor options to use with the default Xen boot option
     
    1718
    1819}}}
     20 * run `update-grub` and reboot
    1921
    20  * run update-grub and reboot
    21 
    22  * Install bridge-utils and xen-tools
    23 
     22== Set up the dom0's network environment ==
     23 * Install `bridge-utils` and `xen-tools`
    2424{{{
    25 aptitude install bridge-utils xen-tools
     25aptitude install bridge-utils
    2626}}}
    27 
    28  * Apply the following diff to /etc/xen/xend-config.sxp
    29 
     27 * Tell Xen to bridge the primary network interface across all domUs -- you can do this by applying the following diff to `/etc/xen/xend-config.sxp`:
    3028{{{
    3129--- xend-config.sxp.orig        2008-03-13 11:23:56.000000000 -0400
     
    5048 # per-vif basis when creating a domain or a configuring a new vif.  The
    5149}}}
    52 
    5350 * Restart xen
    54 
    5551{{{
    5652/etc/init.d/xend restart
    5753}}}
    5854
    59  * Edit /etc/xen-tools/xen-tools.conf. Apply the following diffs:
    60 
     55== Prepare for convenient domU creation and maintenance ==
     56 * install `xen-tools`:
     57{{{
     58aptitude install xen-tools
     59}}}
     60 * Edit `/etc/xen-tools/xen-tools.conf` to adjust for three different things:
     61  * new domUs should be created with `debootstrap`, since we want debian domUs
     62  * domU block devices should be pulled from the primary volume group of the domU
     63  * domUs should use the same kernel as the dom0.
     64 Here's the example diff from `gramsci`:
    6165{{{
    62660 gramsci:/etc/xen-tools# diff -u xen-tools.conf.orig xen-tools.conf
     
    9599-kernel = /boot/vmlinuz-2.6.16-2-xen-686
    96100-initrd = /boot/initrd.img-2.6.16-2-xen-686
    97 +kernel = /boot/vmlinuz-2.6.18-5-xen-686
    98 +initrd = /boot/initrd.img-2.6.18-5-xen-686
     101+kernel = /boot/vmlinuz-2.6.18-6-xen-686
     102+initrd = /boot/initrd.img-2.6.18-6-xen-686
    99103
    100104#
     
    103107}}}
    104108
    105  
     109 * make sure there's enough room in the dom0's filesystem for the domUs to all have their state saved to disk -- this is what happens at a normal shutdown when `/etc/init.d/xendomains stop` gets invoked.  In particular, the domU state gets stored in `/var/lib/xen/save`, and the size of the state files is roughly the size of the memory (plus a little bit extra for the state of the processors).  A decent rule of thumb is to allocate the total size of physical memory + 10% for a separate partition on `/var/lib/xen`.  Here's the situation on fred for example:
     110{{{
     1110 fred:~# xm info | grep ^total_memory
     112total_memory           : 8188
     1130 fred:~# df -h /var/lib/xen
     114Filesystem            Size  Used Avail Use% Mounted on
     115/dev/mapper/vg_fred0-fred_var.lib.xen
     116                      8.9G  149M  8.3G   2% /var/lib/xen
     1170 fred:~#
     118}}}