Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo on gentoo mit XEN
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Deutsche Dokumentation
View previous topic :: View next topic  
Author Message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Sun Mar 12, 2006 1:38 pm    Post subject: gentoo on gentoo mit XEN Reply with quote

Hallo,

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:

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


diese beiden Pakete frei schalten.


dann beides emergen:

Nun schaut Ihr kurz hier vorbeihttps://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:



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


dann geht es weiter:

ganz wichtig:

Code:
rc-update del net.eth0


Code:
rc-update add xend default



nach einem gentoo Neustart mit funktionierendem xen

zu testen mit z.B. xentop


brauchen wir einen Gast--> gentoo

mit:

Code:
dd if=/dev/zero of=/root/gentoomanuell.img bs=1024k count=4096


legen wir ein 4 Gb großes image an.

nun noch ein

Code:
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
   


jetzt geht es mit der gentoo Installation los

also ein stage3 von 2006 sowie ein portage snapshot hier herein kopieren (siehe Gentoo Install Handbuch)

http://www.gentoo.de/doc/de/handbook/handbook-x86.xml?part=1&chap=5

dann die Module des Xen -U Kernels in das Image kopieren


die /etc/fstab im Image anpassen:

Code:
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


so nun das Image unmounten:

eine config erstellen:

Code:

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";



Nun mit xm create -c [Euer config Name]

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:
vncserver -alwaysshared -geometry 1024x768


und können von außerhalb mit z.B. krdc via vnc:/IP-Adresse:1

auf unser gentoo zugreifen.

Fertig. Ich hoffe ich habe nichts vergessen.


Last edited by Tinitus on Fri Jul 28, 2006 9:12 am; edited 2 times in total
Back to top
View user's profile Send private message
SinoTech
Advocate
Advocate


Joined: 20 Mar 2004
Posts: 2579
Location: Neunkirchen / Saarland / Germany

PostPosted: Sun Mar 12, 2006 2:51 pm    Post subject: Reply with quote

Nice :)
Habe im Moment zwar keine Zeit das auszuprobieren, aber ist auf jeden Fall gebookmarked :)

Mfg

Sino
_________________
Help to answer the unanswered
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Mon Mar 13, 2006 10:32 am    Post subject: Reply with quote

Schicke Anleitung Tinitus :)
Verschoben nach Deutsche Dokumentation
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Deutsche Dokumentation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum