When virtual appliances are created and distributed, they are packaged in a special archive format. One such archive format is OVA (short for "Open Virtualization Format"). This format is supported by VirtualBox, VMware, XenServer and several others. An OVA file (with .ova extension) is nothing more than a TAR archive which contains an OVF file, one or more disk image files, and optional manifest files for your certificate and checksums.
The XML-based OVF ("Open Virtualization Format") file specifies the properties of the packaged virtual appliance, such as hardware/networking configuration and disk image format. The disk image contains the content and structure of the disk storage used by the virtual appliance. OVF-supported disk image formats are VDI or VMDK.
If you want to run an OVA virtual appliance on KVM hypervisor, you need to convert the disk image contained in the OVA file into the format supported by KVM (e.g., QCOW2, RAW).
Here is how to convert OVA appliance to QCOW2 format on Linux environment.
The first step is to extract the disk image contained in the OVA file. The tar command will do it.
This will produce an OVF file, one or more disk images (VDI or VMDK), and other optional supplementary files.
Now you just need to convert the extracted disk image(s) to QCOW2 format. For this, you can use the qemu-img command line tool which is a versatile disk image creation/conversion tool.
To install qemu-img on Debian or Ubuntu:
To install qemu-img on CentOS, Fedora or RHEL:
You can check a list of all disk image formats supported by qemu-img as follows.
As shown above, this tool does support both VDI and VMDK formats.
To convert VDI image to QCOW2 format:
To convert VMDK image to QCOW2 format:
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!