Changes between Version 10 and Version 11 of install_debian_xen
- Timestamp:
- Mar 14, 2008, 10:35:52 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
install_debian_xen
v10 v11 1 [[PageOutline]] 1 2 = Setup xen = 2 3 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):4 How to set up a debian Xen dom0 with the associated hypervisor for a standard May First/People Link server: 4 5 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): 5 8 {{{ 6 aptitude install xen-hypervisor xen-linux-system-2.6.18- 4-xen-686 libc6-xen9 aptitude install xen-hypervisor xen-linux-system-2.6.18-6-xen-686 libc6-xen 7 10 }}} 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: 11 12 {{{ 12 13 ## Xen hypervisor options to use with the default Xen boot option … … 17 18 18 19 }}} 20 * run `update-grub` and reboot 19 21 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` 24 24 {{{ 25 aptitude install bridge-utils xen-tools25 aptitude install bridge-utils 26 26 }}} 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`: 30 28 {{{ 31 29 --- xend-config.sxp.orig 2008-03-13 11:23:56.000000000 -0400 … … 50 48 # per-vif basis when creating a domain or a configuring a new vif. The 51 49 }}} 52 53 50 * Restart xen 54 55 51 {{{ 56 52 /etc/init.d/xend restart 57 53 }}} 58 54 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 {{{ 58 aptitude 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`: 61 65 {{{ 62 66 0 gramsci:/etc/xen-tools# diff -u xen-tools.conf.orig xen-tools.conf … … 95 99 -kernel = /boot/vmlinuz-2.6.16-2-xen-686 96 100 -initrd = /boot/initrd.img-2.6.16-2-xen-686 97 +kernel = /boot/vmlinuz-2.6.18- 5-xen-68698 +initrd = /boot/initrd.img-2.6.18- 5-xen-686101 +kernel = /boot/vmlinuz-2.6.18-6-xen-686 102 +initrd = /boot/initrd.img-2.6.18-6-xen-686 99 103 100 104 # … … 103 107 }}} 104 108 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 {{{ 111 0 fred:~# xm info | grep ^total_memory 112 total_memory : 8188 113 0 fred:~# df -h /var/lib/xen 114 Filesystem 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 117 0 fred:~# 118 }}}