From Grid5000
Jump to: navigation, search

This page describes the 1.0 version of the minimal environment (see the general strategy for reference images) based on Etch version of Debian distribution for AMD64/EM64T machines. It intends to explain how this environment was built and how to use it with Kadeploy 2.1.7. This page is inspired from Etch-x64-nfs-1.1


Identification sheet


Kernel version 2.6.18-6-xen-amd64 from Debian for amd64/em64t


  • Remote console: enabled on ttyS0 at 34800 bps
  • Services: ldap:yes, nfs:yes
  • Accounts: root:grid5000




Here are explanations on how the system was installed and tuned from etch-x64-nfs-1.1.


Motd is updated :

cat > /etc/motd.tail <<EOF
Etch-x64-xen-1.0 (image based on Debian version Etch for AMD64/EM64T)
Maintained by Cyril Constantin <>
Valid on Dell {PE1855, PE1950}, HP {DL140G3, DL145G2, DL385G2}, 
      IBM {e325, e326, e326m}, Sun {V20z, X2200 M2, X4100},
      Altix Xe 310
 * Text: Vim, XEmacs, JED, nano, JOE
 * Script: Perl, Python, Ruby
 (Type "dpkg -l" to see complete installed package list)
 * i386 shared libraries are available
 * SSH has X11 forwarding enabled
 * Max open files: 8192
 * TCP bandwidth: for 1Gbs
 More details:

Adding packages

We add Xen packages :

apt-get install linux-image-xen-amd64 xen-hypervisor xen-tools bridge-utils sysfsutils

We add yaml ruby package for automatic reconfiguration purpose and screen for usability.

apt-get install libyaml-ruby screen



Use of bridge on eth0 is a good solution. We set it by modifying the file /etc/xen/xend-config.sxp :

  • Comment the line :
#(network-script network-dummy)
  • Uncomment the line :
(network-script network-bridge)


Xen-tools allow to create image automatically.

The configuration file /etc/xen-tools/xen-tools.conf is modified to suit default configuration :

dir = /opt/xen
debootstrap = 1
size   = 400Mb      # Disk image size.
memory = 128Mb    # Memory size
swap   = 128Mb    # Swap size
fs     = ext3     # use the EXT3 filesystem for the disk image.
dist   = etch    # Default distribution to install.
image  = sparse   # Specify sparse vs. full disk images.
dhcp = 1
kernel = /boot/vmlinuz-2.6.18-6-xen-amd64
initrd = /boot/initrd.img-2.6.18-6-xen-amd64
mirror =

And we create the default dir :

mkdir /opt/xen

The connection to the user domains is automatically configured with following operations :

  • Creation of ssh keys (without password):
  • Adding key authorized in image :
mkdir -p /etc/xen-tools/skel/root/.ssh
cat /root/ > /etc/xen-tools/skel/root/.ssh/authorized_keys

domU creation

A dhcp is provided on virtual address range ; See Network_interlink#Reserve_IP_addresses_to_use for more details.

We create the image and configuration files :

xen-create-image --hostname=domU

Configuration file domU.cfg is in /etc/xen/ directory.

domU is started automatically :

cd /etc/xen/auto
ln -s ../domU.cfg 


We will use many loop images, so we add in /etc/init.d/xend the line :

modprobe loop max_loop=256


Kernels headers should be installed :

apt-get install linux-headers-2.6.18-6-xen linux-headers-2.6.18-6-xen-amd64

Kernel has been modified so mx should be regenerated.

cd /usr/local/src/mx-1.2.5
./configure --prefix=/usr/local --enable-64b --enable-10g --enable-2g
make install

Kernel has been modified so e1000 module should be regenerated.

cd /usr/local/src/e1000-
make install

Additionnal tools

Some commands have been added to automate reconfiguration of virtual machines. The page describe those components.


We remove normal kernel :

apt-get remove linux-image-2.6.18-6-amd64 linux-headers-2.6.18-6-amd64 linux-headers-2.6.18-6


Finally, the date of the release is updated.

date > /root/release


Creating image's archive

Now, environment has been build. Its corresponding image file has to be generated. At this point, the environment contains configuration files that depends of the site which installs it. These files must be excluded from image archive to stay as neutral as possible.

System archive creation and retrieving is now an easy task:

tgz-g5k cconstantin@frontale:images/etch-x64-xen-1.0.tgz

Creating postinstall's archive

Postinstall archive is the etch-x64-base-1.0 postinstall.

Recording environment

Recording environment can be done from a description file. So we create etch-x64-xen-1.0.dsc:

name = etch-x64-xen-1.0
description =
author =
filebase = file:///grid5000/images/etch-x64-xen-1.0.tgz
filesite = file:///grid5000/postinstalls/etch-x64-nfs-1.0-post.tgz
size = 1000
initrdpath = /boot/xen-3.0.3-1-amd64.gz dom0_mem=1000000 --- /boot/vmlinuz-2.6.18-6-xen-amd64 --- /boot/initrd.img-2.6.18-6-xen-amd64
kernelpath = mboot.c32
fdisktype = 83
filesystem = ext3

With karecordenv, the new environment can be known by Kadeploy:

karecordenv -fe etch-x64-xen-1.0.dsc
Personal tools

Public Portal
Users Portal
Admin portal
Wiki special pages