3

I have a virtual appliance in Xen format (XVA) that I wish run to on another hypervisor (MS Hyper-V). What have I done so far:

I have converted the XVA to OVF using XenConvert, this resulted in a vhd file. I created a new VM and attached the vhd to it.

The VM fails to boot, I think this happens because it runs a xen dom0 kernel. This is the error:

Error 13: Invalid or unsupported executable format

I think I need to replace the xen kernel with a non xen kernel. Can I simply download a pre-compiled kernel (where?), boot with live cd, place it on disk and change grub.conf?

EDIT:

Trying Doug O'Neal's answer, I needed to install lvm2 (apt-get install lvm2) and mount VolGroup00. After that I installed the kernel with yum and copied it over to the boot partition. I edited grub.conf and tried to boot. System hangs after booting kernel. Any suggestions?

hanging on boot

EDIT2:

changed grub to use tty0 as console (was xvc0), now getting a little further, will troubleshoot that first. EDIT3:

I have changed several references to XEN ad per @Nils answer. It is still needed to replace the kernel and I think this is currently my problem: When I run yum install kernel I am observing the following error:

error opening /sys/block: No such file or directory error opening /sys/block: No such file or directory WARNING: No module xenblk found for kernel 2.6.18-348.18.1.el5

I found that error in the CentOS bug tracker: http://bugs.centos.org/view.php?id=2083 as suggested in there I tried: mkinitrd -v --with=xenblk --omit-scsi-modules --omit-raid-modules /boot/initrd-2.6.18-348.18.1.el5.img 2.6.18-348.18.1.el5 but that fails with:

No module xenblk found for kernel 2.6.18-348.18.1.el5, aborting

4
  • Please remove quiet from kernel command line to get more information.
    – peterph
    Sep 30, 2013 at 22:57
  • Do know which disk-controller is being emulated by Hyper-V?
    – Nils
    Oct 1, 2013 at 21:23
  • @Nils: disk is attached to IDE Controller, lspic shows it as Intel 82371AB/EB/MB PIIX4 IDE [8086:7111]
    – Remko
    Oct 2, 2013 at 6:55
  • xenblk is the driver for XEN-Disk-IO. This is the one you do NOT need any more. You could build with "--with=" for the sata/ide modules instead.
    – Nils
    Oct 7, 2013 at 10:32

2 Answers 2

2
+50

The XEN-Kernel is not the main problem here. You need to bring the Hyper-V-disk-module into the initrd.

After that you need to remove all references to xvda (or the like) and replace them with sda (or the like) within the Bootloader, Grub and /etc/fstab of the "old" DomU.

With kernels newer than 2.6.32 this is a peace of cake - since Linux mainstream contains these modules.

Prior to that you have to compile these modules for your kernel.

Here is a good starting point in Microsoft Technet about that topic.

3
  • Followed your suggestions and got a little but further, see edit
    – Remko
    Oct 2, 2013 at 9:09
  • @Remko try to use the initrd and kernel from the installation media (CentOS 5.9 netboot-iso should suffice). After the system is up and running, update the kernel - that will rebuild the initrd with the suitable driver. After that you should integrate the Microsoft-PV-driver for performance.
    – Nils
    Oct 7, 2013 at 9:01
  • Have not yet got it working but I think your suggestion have put me on the right track.
    – Remko
    Oct 7, 2013 at 18:34
1

Try booting off of a rescue cd and mount your local disks. chroot into the mounted file system and run yum install kernel. This might do it for you.

3
  • Managed to install the kernel but hangs on boot, any suggestions?
    – Remko
    Sep 30, 2013 at 19:40
  • Edited my answer since I got a little but further
    – Remko
    Oct 2, 2013 at 9:08
  • Not enough to 'just' chroot. I don't have experience doing this with CentOS, but on my Debian systems you need to (target = your mounted root device) # mount --bind /sys /target/sys ; mount --bind /proc /target/proc ; mount --bind /dev /target/dev ; ### more details here => wiki.centos.org/TipsAndTricks/CreateNewInitrd
    – Stephan
    Oct 2, 2013 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .