Migration from Cloudmin to XCP-NG
-
Hi Everyone.
Let me start by saying what an amazing product you are building / built!
I converted my homelab from Proxmox to XCP-NG within 2 days of testing.
I started to pitch the product to my manager as well to look at replacing our cloudmin Xen installation as it does not allow live migration between DomU or SRs.
My only challenge I have currently is testing the migration from cloudmin to XCP-NG.
The current system stores the the VHD as RAW .img files and the VM specifications as .cfg files. It uses the Xl toolset and is running Xen 4.14.5.24
From what I can see it also uses PV to run the VM's on the current system.
What would be the best way to import those VMs to XCP-NG?
I have looked at the documentation and tried various methods to get things rolling but not winning.
The script that was listed on the documentation does not allow access to it any more
-
- Convert your PV guest to HVM
- There's a Python script to send them to XCP-ng (see https://xcp-ng.org/docs/migratetoxcpng.html#from-xen-on-linux)
-
@olivierlambert I think the OP tried using the Phyton script, but the link in the documentation is broken. A quick search gives no good results, so hopefully someone on the forum has the script available.
-
Ah indeed, the link is now dead Let me check if I can find it again
edit: ah I know why. Xen community manager is migrating to Hugo. Let me ping him to get back that file!
-
In the meantime: https://gist.github.com/olivierlambert/0182f1cee63568edffd3b71b497b2eff
I'll change the link in the doc.
-
The doc is now updated with the right link: https://xcp-ng.org/docs/migratetoxcpng.html#from-xen-on-linux
Thanks for the feedback!
-
Wow!
Thank you for the response and the feedback!
Let me run with this during the day.
Is it 100% required to convert the PV to HVM before migrating?
Is it possible to convert after its been migrated or can I not just run PV on XCP-NG with some prep work on the Dom0?
-
You can convert after But don't forget to do it, PV is deprecated anyway.
-
So just an update from my side.
The scripted migration works like a charm!
The VM starts up to this point.
[ 1.866672] xcpngtest kernel: blkfront: xvda: barrier: enabled; persistent gr
ants: disabled; indirect descriptors: disabled;
[ 193.898756] xcpngtest dracut-initqueue[118]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 194.434593] xcpngtest dracut-initqueue[118]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 194.970868] xcpngtest dracut-initqueue[118]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 194.971501] xcpngtest dracut-initqueue[118]: Warning: Could not boot.
[ 194.972159] xcpngtest dracut-initqueue[118]: Warning: /dev/xvda1 does not exist
[ 195.003944] xcpngtest systemd[1]: Starting Setup Virtual Console...
[ 195.012622] xcpngtest systemd[1]: Started Setup Virtual Console.
[ 195.014922] xcpngtest systemd[1]: Starting Dracut Emergency Shell...It then drops out to the Dracut Emergency shell.
My suspicion is that the server is presenting xvda instead of xvda1 to the VM.
Just working on that now.
-
My suspicion was correct.
If I edit the grub config to say the root is at /dev/xvda instead of /dev/xvda1 the vm boots succesfully in XCP-NG.
Is there a way to rather edit XCP-Ng to use xvda1 instead of my having to edit the grub file before migration?
-
None I'm aware of, the device path is by default on xvda and this is the "right one" (Grub is on the whole device boot sector, not on a partition)
-
Hi.
So I found an interesting thing on the Cloudmin side.
I am able to change the grub config on the VM before I migrate, which then allows the boot to work on XCP-NG.
How ever my main concern was if for some reason I need to roll back I won't be able to boot the VM up to the point where I can change the grub config.
But in Cloudmin there is an option for me to change the device address that will then be able to match the grub config.
Thank you again for all your assistance!
I am very excited to pitch the migration path to my management this week!