Installation von Debian/Ubuntu Gast-Systemen unter SuSE/XEN 3.1

Um unter SuSE/Novell einen Debian oder Ubuntu Gast einzurichten, ist es notwendig, sich die Voraussetzungen in Form von debootstrap zu verschaffen. Im folgenden ist dargestellt, wie ich es unter openSuSE 10.3 gemacht habe.

Voraussetzungen

Hier ist es ein 64-Bit System

Debian System installieren

  • lvcreate -L8G -n web01lv rootvg
  • lvcreate -L2G -n web01swaplv rootvg
  • mkswap /dev/mapper/rootvg-web01swaplv -L “web01swap”
Setting up swapspace version 1, size = 2147479 kB
LABEL=web01swap, UUID=26a88524-2b5b-4e40-905d-f230d05d6320
  • mkfs.ext3 /dev/mapper/rootvg-web01lv -L “web01”
  • tune2fs -c0 -i0 /dev/mapper/rootvg-web01lv
  • mount /dev/mapper/rootvg-web01lv /mnt/install
  • /opt/software/debian-debootstrap/usr/sbin/debootstrap –arch i386 etch /mnt/install
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://ftp.debian.org/debian...
I: Retrieving adduser
I: Validating adduser
...
I: Configuring apt...
I: Configuring aptitude...
I: Configuring apt-utils...
I: Configuring klogd...
I: Configuring tasksel-data...
I: Configuring sysklogd...
I: Configuring tasksel...
I: Base system installed successfully.
  • chroot /mnt/install

chrooted etch system

xen-s1:/# gpg --keyserver pgpkeys.mit.edu --recv-key 2D230C5F
gpg: directory `/root/.gnupg' created
gpg: can't open `/gnupg/options.skel': No such file or directory
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key 2D230C5F from hkp server pgpkeys.mit.edu
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 2D230C5F: public key "Debian Archive Automatic Signing Key (2006) <ftpmaster@debian.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
xen-s1:/# apt-key list
/etc/apt/trusted.gpg
--------------------
pub   1024D/2D230C5F 2006-01-03 [expired: 2007-02-07]
uid                  Debian Archive Automatic Signing Key (2006) <ftpmaster@debian.org>

pub   1024D/6070D3A1 2006-11-20 [expires: 2009-07-01]
uid                  Debian Archive Automatic Signing Key (4.0/etch) <ftpmaster@debian.org>

pub   1024D/ADB11277 2006-09-17
uid                  Etch Stable Release Key <debian-release@lists.debian.org>

pub   1024D/BBE55AB3 2007-03-31 [expires: 2010-03-30]
uid                  Debian-Volatile Archive Automatic Signing Key (4.0/etch)
sub   2048g/36CA98F3 2007-03-31 [expires: 2010-03-30]

xen-s1:/# gpg -a --export 2D230C5F | apt-key add -
OK
xen-s1:/# apt-get update
  • aptitude install locales console-data console-common module-init-tools ssh
  • dpkg-reconfigure locales console-data
    • en_US ISO-8859-1 // default locale
    • de_DE@euro ISO-8859-15
    • de_DE.UTF-8 UTF-8
    • Don’t touch keymap
  • echo “127.0.0.1 localhost.localdomain localhost loopback” > /etc/hosts
  • echo “web01” > /etc/hostname
  • vi /etc/network/interfaces
iface lo inet loopback
iface eth0 inet dhcp
auto eth0
  • ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
  • vi /etc/fstab
/dev/hda1       /       ext3    defaults,errors=remount-ro  0 1 
/dev/hda2       none    swap    sw
proc            /proc   proc    defaults        0 0
sys             /sys    sysfs   defaults        0 0 
none            /tmp    tmpfs   defaults        0 0
  • passwd
  • exit
  • cp -a /lib/modules/*-xen /mnt/install/lib/modules/

XEN Domain konfigurieren

  • cd /etc/xen/vm
  • vi web01.xen-vm.conf

xen-vm.conf

disk = [ 'phy:/dev/mapper/rootvg-web01lv,hda1,w', 'phy:/dev/mapper/rootvg-web01swaplv,hda2,w' ]
memory = '256'
vcpus = '1'
name = 'web01'
localtime = '1'
vif = [ '' ]
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
extra = '3'
kernel = '/boot/vmlinuz-xen'
ramdisk = '/boot/initrd-xen'
root = '/dev/hda1 ro xencons=tty'
  • xm create -c /etc/xen/vm/web01.xen-vm.conf
 
wissen/gpl/xen/debootstrap-ein-debian-oder-ubuntu-system-als-xen-gast-unter-suse-installieren-howto.txt · Zuletzt geändert: 05.09.2010 20:31
 
Recent changes RSS feed Donate Valid XHTML 1.0 Valid CSS Recent cached RSS feed cacert-signed web site: inhalt.serviert.de