convert VM from xen to proxmox

tnt

Renowned Member
Dec 5, 2012
6
3
68
hi,
i have VM in xen (1hdd 250GB). i trying convert this VM to proxmox:
1. export from xen
2. convert hdd: qemu-img convert importFile.vhd -O qcow2 exportFile.qcow2
3. create VM in proxmox with 250GB qcow2 hdd. dont start.
4. i replace hdd for new VM in proxmox with converted qcow2 hdd
5. start VM

i see grub boot options,
but then i get this error:

Loading Linux 3.2.0-4-686-pae...
error cannot read the Linux header.
Loading initial ramdisk ...
error: you need to load the kernel first

conversion another VM from xen to proxmox is ok,
but these VM is problem.

can anyone help me,

thanks
tnt
 
Loading Linux 3.2.0-4-686-pae...
error cannot read the Linux header.

Hi
Most probably you don't have a kernel installed in your disk image, probably you were booting your Xen DomU using the Dom0 kernel.

So what you should :

* in your Xen Domu do
apt-get install linux-image-amd64

* re export, and reconvert the machine

Alternatively you can boot with the new proxmox VM using a live CD, chroot into the disk image, and call from there:
apt-get install linux-image-amd64
 
What @manu wrote works perfectly, sometimes you also need to install grub if it is not installed already. I did the process literally hundreds of times and it is a "simple" Linux migration.

You can also try to migrate from XEN to LXC, which does not need an installed kernel afterall. Maybe this is easier for you.
 
What @manu wrote works perfectly, sometimes you also need to install grub if it is not installed already. I did the process literally hundreds of times and it is a "simple" Linux migration.

You can also try to migrate from XEN to LXC, which does not need an installed kernel afterall. Maybe this is easier for you.

LnxBill. This would be absolutely amazing if I could migrate from Xen to LXC. LXC suits my needs perfectly.

Would you have information on how to perform that? Like a guide or a Link that I could follow? Couldn't seem to get a lot of information on this here in the forum.

Xen -> LXC should be doable?

Thank you very much
 
It's Linux, so almost everything is possible :-D

Easiest setup would be to create a new container (don't start it) of the source os with similar disk setup and ram and then rsync the files from the old system to the new one and then boot up. Should directly boot up.

Simple migration and still the same mechanism as any Linux-based approach to LXC.
 
It's Linux, so almost everything is possible :-D

Easiest setup would be to create a new container (don't start it) of the source os with similar disk setup and ram and then rsync the files from the old system to the new one and then boot up. Should directly boot up.

Simple migration and still the same mechanism as any Linux-based approach to LXC.

LnxBill,

I'm not sure I understood what you mean. I exported the VM from Xen and then it came up with an xva file.

What can I do with that file to make it a valid KVM machine or LXC container within Proxmox VE?
 
I'm unfamiliar with Xen (the commercial thing), I'm only familiar with the open source version of Xen which is just Linux with some patches, so normal Linux tools can work like a charm. I'd say just log into your Xen box with SSH, determine were the raw files are, mount them in your dom0 and rsync the files to the Proxmox VE container.

Maybe your xva is similar to VMware's ova, which is just a tar ball that you can extract with any packer (e.g. 7z on windows, or plain tar on and unix system).

Migrating Linux to a container works really well. Despite the "official" supported systems I never encountered a system that does not work, so it is really a simple file copy. Xen uses (at least in the open source version) "simple" lvm volumes with ext3/4, xfs or whatever you want on Linux and stores the files there. Simple copy and you're good to go.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!