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:
Boot in Normal Mode
Uninstall any Xenserver Drivers or utilities you can find in the Control Panel (Uninstall Programs Section)
Reboot in Safe Mode by doing Shift-Click on the Power → Reboot Button and selecting the appropriate startup options.
Delete the “C:\ProgramData\Citrix” Directory
Delete the “C:\Program Files\Citrix\XenTools” Directory
It could also be in “C:\Program Files(x86)”
Open a Command Prompt and do the following commands:
sc delete "XenSvc"
sc delete "XenPVInstall"
Press Win + R (or simply open a Run prompt) and run MSConfig. Check that no services for Xenserver are enabled on Startup
Remove any Xenserver Drivers from the Device Manager SPECIALLY DISK DRIVERS (devmgmt.msc)
Reboot into a Normal Boot Sequence
Re-check for any remaining Xenserver Drivers or Services that may remain (Control Panel)
Export to OVF/OVA through XenCenter onto your CIFS/SMB Storage
Edit your OVF File to say it is UTF-8 encoding instead of UTF-16 (XenCenter incorrectly exports UTF-8 as UTF-16)
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
- Add your unused disk to the VM and Test boot
If your VM Blue-screens on boot, that means you’ve probably failed to remove all Xenserver Drivers.
It is most likely the disk drive drivers, see XenPVInstall, so you might have to go back to your Xen VM and check what remains there.
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.
Remove any drivers you might have installed through the CLI
Export the VM to your SMB/CIFS Storage
Edit your OVF File to say it is UTF-8 encoding instead of UTF-16 (XenCenter incorrectly exports UTF-8 as UTF-16)
Remove “console=hvc0” from your /etc/default/grub file and do:
sudo update-grub
- 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
- Add your unused disk to the VM and Test boot
Done!