Direct migration from XCP-ng backup?

justjosh

Well-Known Member
Nov 4, 2019
101
0
56
59
Hello,

The old cluster of XCP-ng failed and I only have backups generated from XenOrchestra in the .vhd format (long delta chain into a full backup). How do I go about importing this directly into Proxmox?

I have managed to only get as far as extracting the last delta .vhd with 7zip that gives us 1.img and 2.lvm files. Tried to use qm importdisk on 2.lvm to attach the disk to a VM with similar specs but unable to access the VM via console in GUI or SSH into the server. But proxmox doesn't throw any errors that VM failed to start and there seems to be a small amount of RAM and CPU consumed while in this unknown state.

Suggestions appreciated.

Thanks!
 
VHD is the HyperV/Microsoft format I believe. I don't know if qemu-img convert supports the Xen flavor of VHD natively or if you need a converter like StarWind's.

Basically convert VHD to QCOW2, then import the QCOW2 disk with as similar of a host profile as possible to what you had in Xen (if the config is available, if not, hopefully you're running Linux VMs, but there are some safe guesses to take).

https://docs.openstack.org/image-guide/convert-images.html
https://pve.proxmox.com/wiki/Advanced_Migration_Techniques_to_Proxmox_VE
 
Last edited:
VHD is the HyperV/Microsoft format I believe. I don't know if qemu-img convert supports the Xen flavor of VHD natively or if you need a converter like StarWind's.

Basically convert VHD to QCOW2, then import the QCOW2 disk with as similar of a host profile as possible to what you had in Xen (if the config is available, if not, hopefully you're running Linux VMs, but there are some safe guesses to take).

https://docs.openstack.org/image-guide/convert-images.html
https://pve.proxmox.com/wiki/Advanced_Migration_Techniques_to_Proxmox_VE
Config is lost. It's a Ubuntu VM. Basically if I use kpartx on 2.lvm I see all the files I would see in the VM. So I believe I just need to make Proxmox run the OS from that image file somehow.

I also believe qm importdisk already converts to the right format for ceph storage?
 
Yes, so based on the documentation, qm importdisk will work on images that QEMU supports, I believe it supports VHD natively (so no need to unpack it), but if it doesn't work, you'd have to manually convert it to QCOW2 as I said above.
 
Yes, so based on the documentation, qm importdisk will work on images that QEMU supports, I believe it supports VHD natively (so no need to unpack it), but if it doesn't work, you'd have to manually convert it to QCOW2 as I said above.
Do you know how to merge the delta chain files into a single VHD for converting?
 
Do you know how to merge the delta chain files into a single VHD for converting?
I don't know for vhd, but for vmdk, it's possible to simply specify the last snapshot

qemu-img convert -f vmdk -O qcow2 <top_file>.vmdk output.qcow2

(so, it should work with "qm disk import..." command too
 
I don't know for vhd, but for vmdk, it's possible to simply specify the last snapshot

qemu-img convert -f vmdk -O qcow2 <top_file>.vmdk output.qcow2

(so, it should work with "qm disk import..." command too

Using qemu-img convert on the top file only creates a qcow2 file of the same size as the last snapshot and not the full file
 

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!