Migrating a XenServer VM to Proxmox VE

The following section contains information on how to migrate Xenserver VMs to a Proxmox Virtual Environment

Requirements

  • CIFS/SMB to dump VM Exports
  • An additional IP Address for the Xenserver Node to do the export on the same interface you’ve connected the CIFS
  • A bit of patience (For Windows VMs)

Windows VMs

To migrate a Windows VM from Xenserver you’ll need to follow the next steps:

  1. Boot in Normal Mode

  2. Uninstall any Xenserver Drivers or utilities you can find in the Control Panel (Uninstall Programs Section)

  3. Reboot in Safe Mode by doing Shift-Click on the Power → Reboot Button and selecting the appropriate startup options.

  4. Delete the “C:\ProgramData\Citrix” Directory

  5. Delete the “C:\Program Files\Citrix\XenTools” Directory

    It could also be in “C:\Program Files(x86)”

  6. Open a Command Prompt and do the following commands:

sc delete "XenSvc"
sc delete "XenPVInstall"
  1. Press Win + R (or simply open a Run prompt) and run MSConfig. Check that no services for Xenserver are enabled on Startup

  2. Remove any Xenserver Drivers from the Device Manager SPECIALLY DISK DRIVERS (devmgmt.msc)

  3. Reboot into a Normal Boot Sequence

  4. Re-check for any remaining Xenserver Drivers or Services that may remain (Control Panel)

  5. Export to OVF/OVA through XenCenter onto your CIFS/SMB Storage

  6. Edit your OVF File to say it is UTF-8 encoding instead of UTF-16 (XenCenter incorrectly exports UTF-8 as UTF-16)

  7. Import from Proxmox with the following commands, first the metadata, then the disks:

qm importovf $vm_id $file_name $target_storage
qm importdisk $vm_id $file_name $target_storage
  1. Add your unused disk to the VM and Test boot

Optional Steps

  • Delete all .sys files related to XenTools in “C:\Windows\System32\drivers\xen*.sys”

  • Delete all .dll files related to XenTools in “C:\Windows\xen*” and “C:\Windows\System32\xen*”

Linux Based VMs

With Linux VMs it’s much simpler to migrate them.

  1. Remove any drivers you might have installed through the CLI

  2. Export the VM to your SMB/CIFS Storage

  3. Edit your OVF File to say it is UTF-8 encoding instead of UTF-16 (XenCenter incorrectly exports UTF-8 as UTF-16)

  4. Remove “console=hvc0” from your /etc/default/grub file and do:

sudo update-grub
  1. Import from Proxmox with the following commands, first the metadata, then the disks:
qm importovf $vm_id $file_name $target_storage
qm importdisk $vm_id $file_name $target_storage
  1. Add your unused disk to the VM and Test boot

Done!