Migrate windows VMs from Xen/XCPNG to Proxmox

tmatthaeus

Renowned Member
Apr 26, 2012
9
0
66
Bremen, Germany
Hello everybody,


Currently I am migrating virtual machines from XCPNG version 7.6.0 (formerly XENServer) to Proxmox 6.0.

With Linux VMs it works fine. Export OVA, convert to RAW and then to QCOW2, boot, remove the HVC0 specification from the Grub console. Start, ready, happy!

With Windows, however, I'm desperate. The machine basically sees the hard disk and boots but then immediately crashes with a BlueScreen. Or even worse: With no info at all, because it is a Windows server 2012. Hachja.

I tried to boot the Windows 7 machine with a CD, then in the shell with dism /Image:D:.... to delete the drivers from XEN and add the VirtIO drivers. Unfortunately this doesn't bring any noteworthy progress.

Have any of you successfully migrated Windows machines from a XEN/XCP server to a Proxmox server and are using them now?
 

Attachments

  • windows-bluescreen.png
    windows-bluescreen.png
    169.8 KB · Views: 55
Did the VMs boot in UEFI mode before?
What did you set for the Bus/Device of the disks?
 
Not sure if you need it anymore, but for others as well, I just completed a bunch of Win migrations from XCP-ng and Xen, here's the steps I took:

Before shutting down:
Uninstall XEN VSS provider(run cmd script in Citrix Tools folder, older versions do not have this)
Uninstall Xen Tools (https://support.citrix.com/article/CTX225911)
Delete xen filters from registry if they exist(details in url above)

Setup new VM with VirtIO devices, including VirtIO SCSI and SCSI disks
Clonezilla to new VM(or however you want to transfer)

Boot from Windows CD into Recovery Shell

Load vioscsi drivers from driver ISO so you can access the disk:
drvload vioscsi.inf
My boot partition ended up as c: and system partition ended up as e: (change next steps drive letters as needed)

Get list of installed drivers:
dism /image:e:\ /get-drivers

Delete any Xen drivers you find:
dism /image:e:\ /remove-driver /driver:oem{#}.inf etc. del e:\windows\system32\drivers\xen*

add vioscsi driver
dism /image:e:\ /add-driver /driver:vioscsi.inf

Fix bootrec:
attrib c:\boot\bcd -h -r -s del c:\boot\bcd bootrec /rebuildbcd
 
  • Like
Reactions: jbhewitt and guletz
We also had the problem running newer windows servers which was caused by msr.
You can try to temporary add this:
Bash:
echo 1 > /sys/module/kvm/parameters/ignore_msrs
and then start the machine again. If it works, make it permanent within modprobe conf:
Code:
options kvm ignore_msrs=1
 
+1 for this - I was searching for answers on how to migrate windows 2019 server client from Xen to Proxmox and this solved all my problems - thank you!

Not sure if you need it anymore, but for others as well, I just completed a bunch of Win migrations from XCP-ng and Xen, here's the steps I took:

Before shutting down:
Uninstall XEN VSS provider(run cmd script in Citrix Tools folder, older versions do not have this)
Uninstall Xen Tools (https://support.citrix.com/article/CTX225911)
Delete xen filters from registry if they exist(details in url above)

Setup new VM with VirtIO devices, including VirtIO SCSI and SCSI disks
Clonezilla to new VM(or however you want to transfer)

Boot from Windows CD into Recovery Shell

Load vioscsi drivers from driver ISO so you can access the disk:
drvload vioscsi.inf
My boot partition ended up as c: and system partition ended up as e: (change next steps drive letters as needed)

Get list of installed drivers:
dism /image:e:\ /get-drivers

Delete any Xen drivers you find:
dism /image:e:\ /remove-driver /driver:oem{#}.inf etc. del e:\windows\system32\drivers\xen*

add vioscsi driver
dism /image:e:\ /add-driver /driver:vioscsi.inf

Fix bootrec:
attrib c:\boot\bcd -h -r -s del c:\boot\bcd bootrec /rebuildbcd
 
+1 for this - I was searching for answers on how to migrate windows 2019 server client from Xen to Proxmox and this solved all my problems - thank you!

Heyy,
I am kinda newbie at it, can you please help me with straight method in order to move or copy or migrate(whatever) VMs from xenserver and XCP-ngserver to Proxmox... Please...

Hoping for your quick response.

Thank you
 
Best bet you can do is to boot into rescue system and do a zerofree. After that you can dd and zip all your disks to an image and need to copy them to your new environment. Then you need to dd the images again to your new disks. Problem solved. Maybe you should install a test copy of windows to have no problems like the msr problem mentioned above. Thats all. Pretty straight forward.
 

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!