Migrating (Import) of Images to Proxmox

janczmok

Member
Feb 19, 2021
15
0
6
53
Hi,

i wonder that is the best strategy to migrate VMs between XEN (debian, xen_version : 4.11.4) and proxmox.
On Debian/Xen we use the normal disk setup on lvs, so:

root = '/dev/xvda2 ro'
disk = [
'phy:/dev/vg-ssd/debian-vm-disk,xvda2,w',
'phy:/dev/vg-ssd/debian-swap,xvda1,w',
]

As this is not the Citrix Variant, but rather generic xen, i wonder what the easiest way of migration is without re-creating a new image and rsync into it.

My step failed (i tried lvcreate using the correct name, then mkfs.ext4 then mount then rsync vm over)). I assume proxmox raw images do have some kind of fdisk header
which my file apparently does not have.

Open to suggestions, but what is the preferrred way of migration XEN (not citrixXEN) to proxmox.
 
I do not know if your Xen devices in those LVs have some special format. If they are "normal" disk images in a logical volume I would try using qm importdisk ( https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_importing_virtual_machines_and_disk_images ) without tinkering with the destination volume by myself.

Edit: "I assume proxmox raw images do have some kind of fdisk header" - No, for my best knowledge they are normal harddisks, they can be examined and mounted with the usual tools. Of course there are some pitfalls: disks contain a Partition Table and if it is compressed the de-compression mechanism must be active (and the same for encryption). So a simple "mount .../pve-image" ususally does not work without considering these details.
 
Last edited:
Those images are usually created by

lvcreate vg00 -L <SIZE_IN_GB>G -n <IP_ADDRESS>-disk
mkfs.ext4 -F /dev/vg00/<IP_ADDRESS>-disk
mount /dev/vg* /mnt/xyz

Also i wonder where i can dd the images to, as i see space free in local-lvm but cannot do a create of disk image.
 

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!