2

I have raw image with xen hypervisor powered Virtual Machine (ubuntu 12)

I converted it to vhdx (Hyper-V) format and now trying to boot it:

Grub says

error 13 invalid or unsupported executable format

Probably, due to para-virtualized VM style this image does not have full boot kernel

Is there some way to add (re-install?) kernel files to VM or it will be easier to just make clean OS install and copy all files?

I have access to VM's disk from another liveCd linux distro and to grub menu aswell

timhok
  • 21
  • 4

2 Answers2

2

Did you try to export your XenServer vm to OVF format and import in Hyper-V?

The Microsoft has a VM Converter that suppports import from Open Virtualization Format, take a look here: https://technet.microsoft.com/library/dn873998.aspx

Also is interesting to try a V2V software that fit your needs, there are so many good solutions out there, paid and also free.

Take in mind if you migrate to Hyper-V 2012, you need to choose from virtual machine Generation 1 (IDE Interface) or Generation 2 (SCSI interface), the Generation 2 also support EFI boot and sometimes is not compatible for some migration scenarios, try Gen1 first.

I recommend this article as a good aproach: http://xenappblog.com/2013/goodbye-xenserver-welcome-hyper-v/

I my own experience, I have been migration Windows VMs from Xen to Hyper-V, never migrate a Linux yet, but I use a R1 SOFT Server Backup solution, I backup my VM on Xenserver, create a new one in Hyper-V with same number and hard disk sizes, and take a BARE METAL restore. After restore you need to attach the Integration Services disk, install it and boot! It´s done and works great.

Also, try Starwind V2V, it supports migration from KVM, XEN and VmWare to HV https://www.starwindsoftware.com/converter

I hope it helps you.

  • 1
    I'm curious if it is indeed paravirtualized. Migration tools almost never work for paravirt kernels. On a better note, it's more than possible to install a non-paravirt kernel via a chroot on the existing vm filesystem. – Spooler Sep 05 '16 at 03:51
  • 2
    AFAIK StarWind Converter does some kind of patching during the conversion process. Worth a try at least. – Strepsils Sep 06 '16 at 13:47
0

I installed proper kernel from same distro and re-installed grub, vm works just fine now

timhok
  • 21
  • 4