On 11/30/23 23:04, Jeffrey Walton wrote:
I don't know how well QEMU/KVM/libvirt handle other disk images, like
from VMware.

I have done it.


My Keeper:

References:
    http://serverfault.com/questions/273982/virt-convert-ovf-to-kvm
    http://edoceo.com/notabene/ova-to-vmdk-to-qcow2
    http://wiki.hackzine.org/sysadmin/kvm-import-ova.html



Converting OVA for use with KVM / QCOW2

The OVA file is nothing more than a TAR archive, containing the .OVF and .VMDK files. Easy!

Using Evergreen ILS for example:

~ $ file Evergreen_trunk_Squeeze.ova
Evergreen_trunk_Squeeze.ova:                POSIX tar archive (GNU)

I'ts possible to use the tar command to list the contents

~ $ tar -tf Evergreen_trunk_Squeeze.ova
Evergreen_trunk_Squeeze.ovf
Evergreen_trunk_Squeeze-disk1.vmdk

Simply extract those things...

~ $ tar -xvf Evergreen_trunk_Squeeze.ova
Evergreen_trunk_Squeeze.ovf
Evergreen_trunk_Squeeze-disk1.vmdk

Now take a look at the created files The OVF XML file describes the image, it makes for some interesting reading about the expectations of the running environment.

~ $ file Evergreen_trunk_Squeeze*
Evergreen_trunk_Squeeze-disk1.vmdk: VMware4 disk image
Evergreen_trunk_Squeeze.ova:        POSIX tar archive (GNU)
Evergreen_trunk_Squeeze.ovf:        XML document text

Recent versions of qemu are able to run directly from the VMDK file, buy why do that? Use QCOW2, it's better. Execute: qemu-img -h and the last line of output shows the supported formats.

~ $ qemu-img -h |tail -n1
Supported formats: raw cow qcow vdi vmdk cloop dmg bochs vpc vvfat qcow2 parallels nbd blkdebug sheepdog host_cdrom host_floppy host_device file

Now actually convert it, this may take some time.

~ $ qemu-img convert -O qcow2 Evergreen_trunk_Squeeze-disk1.vmdk Evergreen_trunk_Squeeze.qcow2
--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to