meine Versuche mit gentoo tragen endlich erste Früchte. Vielleicht erspart Euch das 3 lange Nächte.
Also um Xen zum Laufen zu bekommen muß man erst mal
Code: Select all
emerge -pv app-emulation/xen sys-kernel/xen-sources
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] app-emulation/xen-9029-r2 -custom-cflags -debug +doc -pae +screen 0 kB
[ebuild R ] sys-kernel/xen-sources-2.6.16_rc5 -build +doc -symlink 0 kB
dann beides emergen:
Nun schaut Ihr kurz hier vorbeihttp://forums.gentoo.org/viewtopic-t-439363.html
wie kompiliere ich den Kernel
ein make && make modules && make modules_install && make install sollte Euch den XEN Kernel komplett nach /boot kopieren
beim DomU Kernel müßt Ihr nur die Module installieren lassen. Sie werden automatisch in ein Verzeichnis nach /lib/modules/2.6.16-rc5-xen-U kopiert
dann habt Ihr da noch 2.6.16-rc5-xen-0... das sind die Dom0 Kernelmodule.
bei mir sieht menu.lst von grub so aus:
Code: Select all
title XEN Gentoo
kernel (hd0,6)/boot/xen-3.gz dom0_mem=3000000
module (hd0,6)/boot/vmlinuz-2.6.16-xen root=/dev/sda7 udev doscsi
ganz wichtig:
Code: Select all
rc-update del net.eth0 Code: Select all
rc-update add xend defaultnach einem gentoo Neustart mit funktionierendem xen
zu testen mit z.B. xentop
brauchen wir einen Gast--> gentoo
mit:
Code: Select all
dd if=/dev/zero of=/root/gentoomanuell.img bs=1024k count=4096nun noch ein
Code: Select all
mkdir /mnt/gentoo
dann das Filesystem esrtellen:
mkfs.reiserfs -f /root/gentoomanuell.img
und ein:
mount -o loop /root/gentoomanuell.img /mnt/gentoo
mounted das Image
also ein stage3 von 2006 sowie ein portage snapshot hier herein kopieren (siehe Gentoo Install Handbuch)
http://www.gentoo.de/doc/de/handbook/ha ... t=1&chap=5
dann die Module des Xen -U Kernels in das Image kopieren
die /etc/fstab im Image anpassen:
Code: Select all
cat /etc/fsatb
cat: /etc/fsatb: No such file or directory
xengast ~ # cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/BOOT /boot ext2 noauto,noatime 1 2
/dev/hda / reiserfs noatime 0 1
#/dev/SWAP none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
# NOTE: The next line is critical for boot!
proc /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
eine config erstellen:
Code: Select all
cat /etc/xen/gentoomanuell
# general
name = "gentoogast";
memory = 256;
# booting
kernel = "/boot/xenkernel/vmlinuz-2.6.16-rc3-xen-r1-U";
builder = "linux";
# virtual harddisk
disk = [ 'file:/root/gentoomanuell.img,hda,w' ];
root = "/dev/hda ro";
# virtual network
#vif = [ 'mac=aa:00:da:f4:2d:a0' ];
dhcp = "dhcp";
den gast starten:
Da mit dem Parameter -c eine Konsole zur virtuellen Maschine geöffnet wird. Könnt Ihr mit :
emerge net-libs/libvncserver den VNC Server installieren
(ich installiere mir immer noch den mc...auf jeden Fall braucht Ihr auch xorg..sonst geht das folgende nicht...denke ich)
nun starten wir im Gast den VNC Server mit:
Code: Select all
vncserver -alwaysshared -geometry 1024x768auf unser gentoo zugreifen.
Fertig. Ich hoffe ich habe nichts vergessen.


