How to convert OVA image to QCOW2 format on Linux - BRS MEDIA TECHNOLOGIES
Migrate VM

How to convert OVA image to QCOW2 format on Linux

Question: I have downloaded a virtual appliance packaged in OVA format. I want to convert the OVA image to QCOW2 format, so that I can run the virtual appliance on KVM hypervisor. How can I convert OVA image to QCOW2 format on Linux?

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.

Step One: Extract Disk Image from OVA

The first step is to extract the disk image contained in the OVA file. The tar command will do it.

$ tar -xvf appliance.ova

This will produce an OVF file, one or more disk images (VDI or VMDK), and other optional supplementary files.

Step Two: Convert Disk Image to QCOW2

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:

$ sudo apt-get install qemu-utils

To install qemu-img on CentOS, Fedora or RHEL:

$ sudo yum install qemu-img

You can check a list of all disk image formats supported by qemu-img as follows.

$ qemu-img -h | tail -n1

As shown above, this tool does support both VDI and VMDK formats.

To convert VDI image to QCOW2 format:

$ qemu-img convert -O qcow2 input.vdi output.qcow2

To convert VMDK image to QCOW2 format:

$ qemu-img convert -O qcow2 input.vmdk output.qcow2


Key Terms:

  • Hyper-V
  • ,
  • KVM
  • ,
  • open-source virtualization platform
  • ,
  • OVA
  • ,
  • QCOW2
  • ,
  • VIRTUALBOX

Related Article

Pihole UnboundDNS Configuration

Pi-hole as All-Around DNS Solution with Unbound DNS

Contents1 The problem: Whom can you trust?1.1 What is a recursive DNS server?1.2 What does this guide provide?1.2.1 A standard […]

Windows Run Commands

Useful Windows Run Commands for IT Automation

Contents1 Windows Run Command for IT Operation and Automation2 Here is a list of commands you can execute from the […]

website hosting

Facts of Different Types of Web Hosting Services

Contents1 10 Different Types of Web Hosting1.0.1 Typically, web hosting requires the following:1.0.2 Types of hosting1.0.3 Hosting Management1.0.4 Reliability and […]