Moving VM from xen to proxmox
🔁 Migration Workflow: XenServer to Proxmox
1. Prepare on XenServer (source node)
Turn off the VM and activate its LVM logical volume:
xe vm-disk-list vm=source.host.name
# get the logical volume ID
lvdisplay | grep LV_DISK_ID
# Activate the logical volume
lvchange -a y /dev/VG_XenStorage-LV_DISK_ID/VHD-ID
Tip: ReplaceLV_DISK_ID
andVHD-ID
with actual values fromlvdisplay
.
2. Export over the network (Xen to Proxmox)
Start listener on destination (Proxmox):
nc -l -p 5000 | pv | dd bs=4096 of=/dev/mapper/vg-vm--111--disk--0
Then send the raw disk from source (XenServer):
xe vdi-export uuid=LV_DISK_ID format=raw filename= | nc prox.mox.host 5000
Optional: You can use pigz
for compression on-the-fly if both sides support it:
💡 Alternative Direct Pipe Method (may not work with LVM-based storage)
dd if=/dev/mapper/VG_XenStorage--ID bs=4096 status=progress | ssh [email protected] 'dd of=/dev/mapper/vg-vm--111--disk--0 bs=4096'
🛠️ After Migration (CentOS or similar guests)
If migrating CentOS (especially with LVM or disk controller differences), rebuild initramfs
:
dracut -f --regenerate-all -v
For more information about how to do that using you can check my other article: Rebuilding initramfs