Importing from Redhat Virtualization
-
Hello all,
Complete noob to Xen but liking it so far except for one issue. Importing a test VM from RedHat Virtualization to xcp-ng. So in RHV, I selected "Export to OVA" from our test vm. It created an OVA file. Great! So far so good. I then mount the NFS directory containing the exported VM (ignis.ova) on the xcp-ng host server. Once I have it mounted, I then try to import it with xe vm-import. This is where I'm having issues:[15:34 host1 ignis]# xe vm-import filename=/tmp/ovaimport/ignis/ignis.ova sr-uuid=c7103321-7066-79d1-2f13-2f3d723c3506 preserve=true The VM could not be imported because the XVA file is invalid: an unexpected file was encountered. filename_expected: ova.xml filename_found: vm.ovf
I then try to extract the OVA file and import it that way, but then receive another error:
[15:39 host1 ignis]# tar xf ignis.ova [15:43 host1 ignis]# ll total 146791224 -rw-r--r-- 1 root root 75157078016 Feb 12 11:21 795f650b-5c8a-4463-87a6-d02b1f8819cc -rw------- 1 root root 75157103616 Feb 14 14:44 ignis.ova -rw-r--r-- 1 root root 2535 Feb 12 11:21 nvram.dat -rw-r--r-- 1 root root 512 Feb 12 11:21 pad -rw-r--r-- 1 root root 19034 Feb 12 11:21 vm.ovf [15:46 host1 ignis]# xe vm-import filename=/tmp/ovaimport/ignis/vm.ovf sr-uuid=c7103321-7066-79d1-2f13-2f3d723c3506 preserve=true The VM could not be imported. msg: INTERNAL_ERROR: [ (Failure Int64.of_string) ]
Any suggestions? I'm sure I'm missing something. Thanks!
-
@florent Thanks for the tip! I was able to import the disk like that.
When starting up the VM after attaching it, it was stuck at "Booting from disk...". After changing the boot firmware from "bios" to "uefi", it booted up just fine. This can be marked as solved.
-
@casty Import through Xen Orchestra, it makes it way easier to complete.
-
@DustinB I tried through Xen Orchestra as well. But once I click on the blue "Import" button, it grays out and just keeps spinning. Nothing is showing up in tasks - like it's not doing anything. So I decided to switch to the "latest" channel from stable and try again. But still no go. I'm running XOA version 5.91.2 as of right now.
-
@casty Check the browser console for any errors. It's possible that the OVA file doesn't adhere to the format used by XO / XCP-ng. Are you able to provide a small OVA that we could test?
-
@Danp Yes, I can provide an ova (~10G) for you to test. Would I just upload it here? Or is there a site to upload it to?
Thanks.
-
@casty hi,
XO expect the disk format inside the ova to be one of the various flavor of vmdk, but here it looks like it is qcow2. We can't convert it on the fly for now
- extract the content ova ( they are tar file)
- convert the disk from qcow2 to vhd with
qemu-img convert -f qcow2 -O vpc <disk> out.vhd
- import the vhd in XO
- create the VM and attach the disk
(we welcome all the other platform refugees, but we still have more work to do on qcow2 and vhdx, at least )
-
@florent Thanks for the tip! I was able to import the disk like that.
When starting up the VM after attaching it, it was stuck at "Booting from disk...". After changing the boot firmware from "bios" to "uefi", it booted up just fine. This can be marked as solved.
-
-
-
-
Is there material in this thread for improving the migration documentation? https://docs.xcp-ng.org/installation/migrate-to-xcp-ng/
-
@stormi said in Importing from Redhat Virtualization:
Is there material in this thread for improving the migration documentation? https://docs.xcp-ng.org/installation/migrate-to-xcp-ng/
the qemu-img convert should be the fallback : it needs a lot of space, around twice the disk size (it varies depending on base format efficiency) and a lot of manual action.
On the other hand it works as long as qemu know the format : https://docs.openstack.org/image-guide/convert-images.html (for vmdk there is a like a dozen of completely different subformat)