Forum des développeurs  

Le forum de référence en programmation et développement. Articles, cours et tutoriels du débutant au chef de projet et DBA confirmé.
Précédent   Forum des développeurs > Hardware, Systèmes et Logiciels > Linux > Applications

Applications Questions sur l'utilisation d'applications, du shell, et des interfaces graphiques (KDE, Gnome, XFCE... )

Réponse
 
Outils de la discussion
Vieux 01/09/2008, 17h47   #1 (permalink)
Membre actif
 
Date d'inscription: février 2008
Localisation: Lille
Âge: 24
Messages: 182
Par défaut Convertir une image VmWare vers Xen

Bonjour à tous,

J'espère postez au bon endroit.

VOilà mon problème, je veux convertir une image VmWare vers Oracle VM. J'ai suivi la procédure pour créer l'image Xen, mis l'image sur le serveur dans le dossier /OVS/running_pool/. J'ai modifié le ficheir vm.cfg mais lorsque je souhaite créer le domaine j'ai une erreur.

Cette erreur lorsque j'utilise la commande bootloader :

Code :
failed:<Exception: return=>failed:<Exception: xm create '/OVS/running_pool/Ubuntu/vm.cfg'=>Error: (2, 'Invalid kernel', 'xc_dom_find_loader: no loader found\n') >>
Sans bootloader, j'ai cette erreur :

Code :
XENBUS: Waiting for devices to initialise....
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
Je vous met le résultat du fstab :

Code :
cat /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
/dev/sda3               /OVS                    ocfs2   defaults        1 0
LABEL=/boot             /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=SWAP-sda5         swap                    swap    defaults        0 0
Ainsi que le ficheir de config :

Code :
#bootloader = "/usr/bin/pygrub"
disk = ['file:/OVS/running_pool/Ubuntu2OVM/Ubuntu2OVM.img,sda3,w',
',sdc:cdrom,r'
]
kernel = "/boot/vmlinuz-2.6.18-8.1.6.0.18.el5xen"
ramdisk = "/boot/initrd-2.6.18-8.1.6.0.18.el5BOOT.img"
root = "/dev/sda3 ro"
memory = "450"
name = "Ubuntu2OVM"
on_crash = 'restart'
on_reboot = 'restart'
vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=dbalille']
vif = ['']
Je ne comprends pas pourquoi je n'y arrive pas... De plus, je ne suis pas un expert en Linux ^^

Merci.
Milo59000 est déconnecté   Envoyer un message privé Réponse avec citation
Vieux 15/09/2008, 19h02   #2 (permalink)
Membre régulier
 
Avatar de SYL666
 
Date d'inscription: novembre 2003
Messages: 132
Envoyer un message via MSN à SYL666
Par défaut

Salut,

Ca tombe bien, j'ai un document pour ça.
Je n'ai jamais pris le temps d'essayer car le projet est tombé à l'eau pour le moment.
C'est en anglais, j'espère que tu es un fan de Shakspeare

Citation:
VMWare to Xen Migration
This document assumes you want to convert a RHEL4u5
or higher VMware guest into a Xen para-virtualized
guest on a RHEL5 host

Prepare the machine for booting with Xen

- First portion here edits /etc/modprobe.conf
so that the next kernel install puts the proper
modules in the initrd. image so it sees things
like network adapters and block devices

The VMWare /etc/modprobe.conf contains:

alias eth0 pcnet32
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptscsi
alias scsi_hostadapter2 mptfc
alias scsi_hostadapter3 mptspi
alias scsi_hostadapter4 mptsas
alias scsi_hostadapter5 mptscsih

Replace that with:

# cat /etc/modprobe.conf
alias eth0 xennet
alias scsi_hostadapter xenblk

The modprobe.conf changes above should make sure
that mkinitrd makes sure the xenblk driver is loaded
on bootup.

Next we need to tell it where to send the default console.

Change the console section of /etc/inittab to
reflect the following:

# Run gettys in standard runlevels
co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav
#1:2345:respawn:/sbin/mingetty tty1
#2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6

Now you need to add a xen enabled kernel (assuming you
have downloaded the kernel-xen from RHN or somewhere else)

# rpm -ivh kernel-xen

Once that is done, shutdown the virtual machine and
use the following commands to convert the vmdk file to a
flat vmdk file:

# vmware-vdiskmanager -r vmware_image.vmdk -t 0 temporary_image.vmdk

Move the ‘temporary_image.vmdk’ file to a Xen host and use
qemu_img to convert vmdk to a raw image file:


# qemu-img convert -f vmdk temporary_image.vmdk -O raw xen_compatible.img

You can either use an existing guest config file or create a new
one (both based on the example below)


Create or modify the config file for your RHEL4 Xen guest in /etc/xen.
If your fully virtualized system was a Xen guest too, you will want to
keep the vif MAC address and the UUID the same as before.
you need to add a bootloader liner and remove the kernel , device_model
lin es also modify the entries for

'disk-' (replace file: with tap:aio: change 'hda' device name to xvda)
'vif=' (remove the type-ioemu entry) etc
(below is a config file fr om a rhel4u5pv guest as a reference)

name = "rhel45_pv"
uuid = "84f53698-34b6-4732-a245-1d83a4015f97"
memory = 12288
vcpus = 8
bootloader = "/usr/bin/pygrub"
extra = "ro root=/dev/VolGroup00/LogVol00 rhgb quiet"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
sdl = 0
vnc = 1
vncunused = 0
keymap = "en-us"
disk = [ "tap:aio:/var/lib/xen/images/rhel45_pv.dsk,xvda,w" ]
vif = [ 'mac=00:16:3e:4f:85:fd, bridge=xenbr0', ]

Start your Xen guest. Make sure to choose the right kernel in the pygrub
menu, because anything except the paravirtualized kernel will fail to boot.

# virsh start rhel4u5
N'hésite pas à me faire savoir si :
* ça marche (ben, oui, j'ai moi même jamais essayé!)
* tu as des problème de traduction (bon, ça reste anglais basique, donc ça devrait aller)
* il y a un hic quelque part (ça me permettra de corriger dans le doc)

Bon courage,

Cedric
__________________
The Big Bang theory : In the beginning there was nothing, and it exploded. (Terry Pratchett)
SYL666 est déconnecté   Envoyer un message privé Réponse avec citation
Vieux 29/09/2008, 14h57   #3 (permalink)
Membre actif
 
Date d'inscription: février 2008
Localisation: Lille
Âge: 24
Messages: 182
Par défaut

Salut et merci.

J'ai trouvé ce lien :

http://www.funkypenguin.info/tutoria...-image-to-xen/

Cela m'a permis de migrer une VMWare RHEL4 vers OVM.

Maintenant je vais essayer pour une Ubuntu. Je vous tiens au courant.
Milo59000 est déconnecté   Envoyer un message privé Réponse avec citation
Réponse

Précédent   Forum des développeurs > Hardware, Systèmes et Logiciels > Linux > Applications



Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are non
Pingbacks are non
Refbacks are non
Navigation rapide


Fuseau horaire GMT +1. Il est actuellement 00h43.


Publiez vos articles, tutoriels et cours et rejoignez-nous dans l'équipe de rédaction du club d'entraide des développeurs francophones. Nous contacter
Copyright 2000-2008 www.developpez.com - Legal informations