KVM qcow2 disk converted and and imported to xcp-ng just works?
-
Hi,
I converted couple of .qcow2 images to .vmdk via qemu-img and imported the disks via XO attached the .vmdk to a new VM and the VM just booted and worked perfectly out of the box like that?
Reading the documentation here, the migration process should be much more complex but i didn't have to do any of that, is there some new magic happening that makes this work out of the box like that or should i expect issues later on doing the imports this way??
Also, after importing the .vmdk image to XO, i checked my SR and noticed that the image was automagically converted to .vhd and i cannot find any trace of the original imported .vmdk files, is this normal also?
Here are exact steps i took:
1. Sparify .qcow2 before conversion: virt-sparsify image1.qcow2 sparse_image1.qcow2 --tmp /mnt/vmdata/backups/Server_name/2024-02-05.212740/ 2. Do conversion: qemu-img convert -p -f qcow2 -O vmdk sparse_image1.qcow2 image1.vmdk 3. Copied the .vmdk image to local machine and started disk import 4. Create VM with new disk 5. Remove created disk and attach imported .vmdk image 6. Boot up VM and everything works, Linux boots up done. 7. Checked SR on xcp-node and it is not .vhd file: [13:08 xcp-node01 6b24cd1c-22ad-0994-5b6b-a75389a6ddba]# file 7e5ac555-68fd-406f-8b23-7185b3e30dab.vhd 7e5ac555-68fd-406f-8b23-7185b3e30dab.vhd: Microsoft Disk Image, Virtual Server or Virtual PC
-
@anik Hi !
When I did migrate from Proxmox to XCP-ng, I just had to do the conversion and import the disk. The step in the documentation was not needed (I suppose it's for old OS or in case of failure)
You can convert directly to VHD instead of convert to VMDK. Here's the step I followed:
qemu-img convert -O vpc proxmox-disk.qcow2 `uuidgen`.vhd scp thegenerateduuid.vhd ip.xcp-ng.server:/run/sr-mount/uuid-of-your-SR
Then with XO, create a VM and attach the disk
-
@AtaxyaNetwork can confirm this works for me as well
I feel like this should be default go-to method mentioned in the documentation and the current documentation mentioned as an alternative.
ps. im not a coder, no idea how to work github to make the changes my self
-
@anik Yep, have a simple method and the alternative in case of failure seems a good idea.
What do you think @olivierlambert ? I can do the PR if needed
-
Sure, go ahead
-
@olivierlambert So, I re-read the doc and the provided documentation is a VERY specific way to do the migration between KVM and Proxmox.
Maybe we can just mention the forum link and redo this section entirely. What do you think ?
-
Sure, we should probably re-do the section in the doc entirely to provide a more comprehensive step by step thing.
-
I am new user to XCP-ng,
Thanks @AtaxyaNetwork for the fast conventual way.