IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VMware Discussion :

Convertir une image VmWare vers Xen


Sujet :

VMware

  1. #1
    Membre actif
    Profil pro
    Étudiant
    Inscrit en
    Février 2008
    Messages
    224
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2008
    Messages : 224
    Points : 211
    Points
    211
    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 : Sélectionner tout - Visualiser dans une fenêtre à part
    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 : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    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 : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    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 : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    #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.

  2. #2
    Membre averti Avatar de SYL666
    Inscrit en
    Novembre 2003
    Messages
    308
    Détails du profil
    Informations forums :
    Inscription : Novembre 2003
    Messages : 308
    Points : 411
    Points
    411
    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

    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)

    IT Quote : "Unix is user-friendly. It's just very selective about who its friends are."

  3. #3
    Membre actif
    Profil pro
    Étudiant
    Inscrit en
    Février 2008
    Messages
    224
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2008
    Messages : 224
    Points : 211
    Points
    211
    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.

Discussions similaires

  1. Convertir une image de type 'int16' vers 'float'
    Par cedji dans le forum Images
    Réponses: 6
    Dernier message: 07/07/2009, 16h06
  2. Réponses: 1
    Dernier message: 27/02/2008, 13h55
  3. Réponses: 0
    Dernier message: 01/11/2007, 23h46
  4. [C#] Convertir une Image en Icon
    Par Piolet dans le forum Windows Forms
    Réponses: 4
    Dernier message: 25/08/2004, 13h41
  5. [C#] Comment convertir une image bmp en jpg !!!
    Par vandeyy dans le forum Windows Forms
    Réponses: 5
    Dernier message: 13/07/2004, 20h37

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo