Bonjour,
Je voudrais mettre en place un serveur-maquette quasi identique a celui qui est en production, mise a part que je ne ferai pas de heartbeat et de DRBD.
Donc sur ma maquette se trouve d’installé xen 2.6.18-6-686 et du lvm.
Voici ce que j’ai fait:
Installation d’une version etch
creation de 2 partition (swap et /)
installation de xen
installation du lvm et creation des LV a l’identique du serveur que je veux virtualiser (alize):
[quote]— Logical volume —
LV Name /dev/vg_1/swap
VG Name vg_1
LV UUID cak03w-5DEV-cm6u-ZN87-D9wI-O5O5-a8X6Jw
LV Write Access read/write
LV Status available
open 0
LV Size 2,00 GB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:0
— Logical volume —
LV Name /dev/vg_1/slash
VG Name vg_1
LV UUID IGoow9-bdas-M4ip-9QHK-Q8c2-IhGM-GtCS9Q
LV Write Access read/write
LV Status available
open 0
LV Size 3,00 GB
Current LE 768
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:1
— Logical volume —
LV Name /dev/vg_1/tmp
VG Name vg_1
LV UUID 5RSELu-KfSK-h5bu-JD8u-nvvT-T8W8-SgsYkc
LV Write Access read/write
LV Status available
open 0
LV Size 1,00 GB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:2
— Logical volume —
LV Name /dev/vg_1/var
VG Name vg_1
LV UUID yljIoT-8Jkq-YHXT-iM5P-CKnK-hPcr-2uEp2r
LV Write Access read/write
LV Status available
open 0
LV Size 5,00 GB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:3
— Logical volume —
LV Name /dev/vg_1/home
VG Name vg_1
LV UUID T9738B-5ZKS-wVdY-VBr0-uN9z-XtaU-Le70ln
LV Write Access read/write
LV Status available
open 0
LV Size 200,00 GB
Current LE 51200
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:4[/quote]
Puis j’ai copié les disques de la machine en production vers la maquette :
dd if=/dev/vg_1/slash | ssh root@192.6.2.56 “dd of=/dev/vg_1/slash” et ainsi de suite pour chaque LV.
Création du fichier de conf du domU dans /etc/xen (nom du fichier alize)
[quote]# Kernel image file.
kernel = “/boot/vmlinuz-2.6.18-6-xen-686”
Optional ramdisk.
ramdisk = “/boot/initrd.img-2.6.18-6-xen-686”
The domain build function. Default is ‘linux’.
#builder=‘linux’
memoire alouees
memory = 2048
nom du DomU
name = “alize”
List of which CPUS this domain is allowed to use, default Xen picks
cpus = '1-3’
vcpus = 3
Define network interfaces.
vif = [ ‘mac=00:16:3e:00:00:01, bridge=eth1’ ]
#disk = [ ‘drbd:alize,hda,w’ ]
disk = [ ‘phy:/dev/vg_1/slash,/dev/mapper/vg_1-slash,w’, ‘phy:/dev/vg_1/swap,/dev/mapper/vg_1-swap,w’, ‘phy:/dev/vg_1/tmp,/dev/mapper/vg_1-tmp,w’, ‘phy:/dev/vg_1/var,/dev/mapper/vg_1-var,w’, ‘phy:/dev/vg_1/home,/dev/mapper/vg_1-home,w’ ]
Set root device.
root = “/dev/mapper/vg_1-slash ro”
Sets runlevel 4.
extra = “4”[/quote]
Pas besoin de modifier le fstab du domU puisque le lvm est identique
Je decide de lancer le domU:
xm create -c alize
[quote]…
Begin: Running /scripts/init-premount …
FATAL: Error inserting fan (/lib/modules/2.6.18-6-xen-686/kernel/drivers/acpi/fan.ko): No such device
FATAL: Error inserting thermal (/lib/modules/2.6.18-6-xen-686/kernel/drivers/acpi/thermal.ko): No such device
Done.
Begin: Mounting root file system… …
Begin: Running /scripts/local-top …
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
device-mapper: ioctl: 4.7.0-ioctl (2006-06-24) initialised: dm-devel@redhat.com
Volume group “vg_1” not found
Done.
Begin: Waiting for root file system… …
Done.
Check root= bootarg cat /proc/cmdline
or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/mapper/vg_1-slash does not exist. Dropping to a shell!
BusyBox v1.1.3 (Debian 1:1.1.3-4) Built-in shell (ash)
Enter ‘help’ for a list of built-in commands.
/bin/sh: can’t access tty; job control turned off
(initramfs)[/quote]
Les deux fatal error je pense que cela ne pose pas de probleme, par contre Volume group “vg_1” not found la c’est autre chose.
J’ai essayé plusieurs manipes et passé quelques jours sur google mais la je seche et vous demande de l’aide.
Merci d’avance