Migration vm from XEN to Proxmox

dsexton18

Member
Jul 3, 2023
41
1
8
https://pve.proxmox.com/wiki/Xenmigratexen to Proxmox migrationI am trying to flush out the process from Xen server to Proxmox. I started following the listed here but when I run the xen server I get
Code:
python3.11 xenmigrate.py -convert=Ref:15 ./{image}.img
  File "/mnt/pve/vm_data/tmp/xenmigrate.py", line 26
    print 'running cmd       :',cmd
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
 
Hi,

it's an older script and meant to be run with Python 2, i.e. it is not compatible with Python 3.

If you are still on Proxmox VE 7.x (and thus Debian 11), Python 2 is still available there in the repositories to install. On Proxmox VE 8.0, you are pretty much out of luck, short of converting the script to Python 3 (you can have a look at 2to3, which is available to install).
 
Thanks for the suggestion. I was able to convert the script to python3 and got the script to work. I converted the file to a .img file. Then used qemu-img convert -f raw -O qcow2 {image}.img {image}.qcow2. How do I get Proxmox to see the file?
 
How do I get Proxmox to see the file?
See the qm import <vmid> <imagefile> <storage> command. Using that, you can import the image file to an existing VM.
That would look like something like this:
Code:
qm import 100 image.qcow2 local-lvm

Hope this helps!
 
hum I am getting the below error.

qm import 500 vm-500-disk.qcow2 vm_data
vm-500-disk.qcow2:1: parser error : Start tag expected, '<' not found
QFI▒
 
qm importdisk 500 vm-500-disk.qcow2 vm_data
Yeah right, sorry - I apparently had the wrong command in mind.

But great to hear you could solve it yourself!
Please just mark the thread as solved by editing the first post - there should be a dropdown near the title field. This helps other people with the same question to more easily find this thread inthe future! :)
 

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!