Etch-x64-xen-1.0

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

Contents

Identification sheet

Etch-x64-xen-1.0

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

Authentication

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

Applications

Misc

Build

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

Motd

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 <cyril.constantin@loria.fr>
Valid on Dell {PE1855, PE1950}, HP {DL140G3, DL145G2, DL385G2}, 
      IBM {e325, e326, e326m}, Sun {V20z, X2200 M2, X4100},
      Altix Xe 310
Applications
 * Text: Vim, XEmacs, JED, nano, JOE
 * Script: Perl, Python, Ruby
 (Type "dpkg -l" to see complete installed package list)
Misc
 * i386 shared libraries are available
 * SSH has X11 forwarding enabled
 * Max open files: 8192
 * TCP bandwidth: for 1Gbs
 More details: https://www.grid5000.fr/index.php/Etch-x64-xen-1.0
EOF

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

Tuning

Xen

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

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
arch=amd64
mirror = http://ftp.fr.debian.org/debian/

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):
ssh-keygen
  • Adding key authorized in image :
mkdir -p /etc/xen-tools/skel/root/.ssh
cat /root/id_rsa.pub > /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 

Loop

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

modprobe loop max_loop=256

Drivers

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
make install

Kernel has been modified so e1000 module should be regenerated.

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

Additionnal tools

Some commands have been added to automate reconfiguration of virtual machines. The page https://www.grid5000.fr/mediawiki/index.php/Xen_related_tools describe those components.

Cleaning

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

Mark

Finally, the date of the release is updated.

date > /root/release

Environment

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 = https://www.grid5000.fr/index.php/Etch-x64-xen-1.0
author = cyril.constantin@loria.fr
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
Namespaces

Variants
Actions
Public Portal
Users Portal
Admin portal
Wiki special pages
Toolbox