I've been thinking about your problem, and I think that rsync or dd backup/restore might be your best bet. If you are using dynamically growing vhdds, then rsync is probably your best bet, and if you are using statically defined disks, then dd is probably your best bet.
First, you will have to create a samba or cfs share, or attach a physical drive by some other means to backup the data. Once you have a backup destination attached, you will have to run the rsync or dd command to backup the drive.
Rsync example (using Arch):
I'm pretty sure you can pipe rsync into gzip if you want to create a portable file.
Then you must install Centos in a new hyper-v machine. Then you have to go through the task of restoring the backup image (which will differ depending on the command you used to create it).
Alternatively, you could create the new CentOS VM first, and then mount the other exported VHD file to the same virtual machine under Hyper-V. Since you will have both drives mounted to the same machine, you could go through the migration process at that point. Once you have mounted the backup drive and migrated your bootloader over to it, you can unmount the replacement VM drive. You could then re-use the same drive to migrate your other machines (rinse and repeat for each VM you need to migrate). If you have many machines you could attempt to script this process, or you might be able to find a backup script already out there.
Create the new VHD/VHDX file with hyper-V, and then attach and mount it to the Xenserver guest you wish to duplicate, and do the backup directly that way.
I know there are a lot of hoops to jump through, there are three solid options that will probably work without too much fuss. I'm kind of newb with Linux, but I've moved HD images around fairly easily with DD before, and I don't see why it wouldn't work nicely here.
If you are using LVM, then the HDDs shouldn't be causing the problem and HD links should be intact after conversion, but I am no expert. I have a fair amount of experience with Linux under Hyper-V, but not converting XenServer machines to Hyper-V. That being said, the error you are seeing suggests to me that it might be an issue with the linux kernel. It would be helpful to know which Linux distribution you are using.
XenServer has two VM types:
HVM VMs - these are equal to Hyper-V VMs and need no changes. These VMs can be converted to Hyper-V machines by conventional means (copy VHD or use System Center 2012 Virtual Machine Manager (VMM) as recommended by Microsoft).
PV VMs - these are 'para virtualized' VMs and don't have a full boot kernel. They are bound to the OS of the VM and share some of the bootloader to bootstrap the machine. You need to replace the PV kernel (kernel-xen) in the VM with the pae kernel (kernel-pae).
I don't know what linux distribution you are using, and that may have some effect on the actual solution, but, assuming the VMs are PV VMs, the following link has instructions on installing the PV kernel on the Linux box, so you want to do the reverse of these instructions, adapting for your Linux distribution. Then the export process should work:
This answer assumes you are using PV kernel on your Xenserver vms, and assumes that is the problem causing boot failure. It also assumes you have already tried using System Center 2012 Virtual Machine Manager (VMM) to convert the vms (as per Microsoft best practices, steps shown at the following link):
- I might try disabling secure boot and seeing if that makes a difference.
- Make sure to follow Microsoft Best Practices for Linux VMs (depending on the distribution you are using). These can be found at the following links, and you could try making those change to the VM prior to doing the export process (be sure to back-up your virtual machine first):
Universal Linux VM under Hyper-V best practices:
Distribution specific Linux VM under Hyper-V best practices:
Lastly, here's what my Linux kernel params look like (Ubuntu/Debian) for my virtual machines (in /etc/default/grub, make sure to run sudo update-grub afterwards):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1366x768 elevator=noop numa=off"
The video=hyperv_fb option will only work once hyper-v integration tools are installed on the VM (distribution specific).