Versione 5 del 2007-12-20 12:25:46

Nascondi questo messaggio
Italiano English
Modifica History Actions

XenOnDebianEtch

Xen on Debian Etch

Si presuppone che gia sapete cosa รจ Xen, qui seguono solo alcune utili note per i passaggi principali della messa in esercizio di un Server con virtualizzazione Xen per ospitare diversi server virtuali.

Dom0

Installate Debian Etch con il CD Netinst. Usate LVM per gestire le partizioni.

Poi assicuratevi di aver installato i seguenti pacchetti con apt-get:

netgroup-xen:~# dpkg -l |grep xen
ii  libc6-xen                              2.3.6.ds1-13etch2               GNU C Library: Shared libraries [Xen version
ii  linux-image-2.6-xen-686                2.6.18+6etch1                   Linux kernel 2.6 image on i686
ii  linux-image-2.6-xen-vserver-686        2.6.18+6etch1                   Linux kernel 2.6 image on i686
ii  linux-image-2.6.18-5-xen-686           2.6.18.dfsg.1-13                Linux 2.6.18 image on i686
ii  linux-image-2.6.18-5-xen-vserver-686   2.6.18.dfsg.1-13                Linux 2.6.18 image on i686
ii  linux-image-xen-686                    2.6.18+6etch1                   Linux kernel image on i686
ii  linux-image-xen-vserver-686            2.6.18+6etch1                   Linux kernel image on i686
ii  linux-modules-2.6.18-5-xen-686         2.6.18.dfsg.1-13                Linux 2.6.18 modules on i686
ii  linux-modules-2.6.18-5-xen-vserver-686 2.6.18.dfsg.1-13                Linux 2.6.18 modules on i686
ii  xen-hypervisor-3.0.3-1-i386-pae        3.0.3-0-2                       The Xen Hypervisor on i386 with pae
ii  xen-tools                              2.8-2                           Tools to manage debian XEN virtual servers
ii  xen-utils-3.0.3-1                      3.0.3-0-2                       XEN administrative tools
ii  xen-utils-common                       3.0.3-0-2                       XEN administrative tools - common files
netgroup-xen:~# 

Nota: questi sono i pacchetti da installare nella Dom0 ! Non confondersi con le DomU.

Creare una DomU

Creare la partizione lvm

lvcreate -Lsize -nNameOfDomUdisk nameOfVolumeGroup
mke2fs -j /dev/nameOfVolumeGroup/NameOfDomUdisk

Oppure creare File

dd if=/dev/zero of=nomefile_hd_della_mia_DomU count=0 seek=dimensionefileinmegabyte
mke2fs -j nomefile_hd_della_mia_DomU

Debian Etch DomU

Ora avete il disco virtuale, per installare ad esempio una Debian Etch

mount /dev/nameOfVolumeGroup/NameOfDomUdisk /mountpoint
debootstrap --arch i386 etch /mountpoint ftp://ftp.unina.it/pub/linux/distributions/debian
chroot mountpoint/

Nel chroot

apt-get update
apt-get install linux-modules-2.6.18-5-xen-vserver-686 libc6-xen

Configurare la configurazione IP in /etc/network/interfaces

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian
# installation (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
        address ip
        netmask mask
        gateway gateway

Gentoo DomU

(da completare)

mount /dev/nameOfVolumeGroup/NameOfDomUdisk /mountpoint
cd /mountpoint
wget stage3.tar.bz2 
cd usr/
wget portage-latest.tar.bz2
mount -t proc /proc /mountpoint/proc
chroot /mountpoint

Fondamentale cambiare le CFLAGS nel make.conf

CFLAGS="-O2 -march=i686 -pipe -mno-tls-direct-seg-refs"

Nel chroot

Ricompilate tutta la macchina con il nuovo make.conf

emerge -evat world

Usate il kernel gia compilato dal sito di Xen!