How To Convert OVA Image to QCOW2 – QEMU and Virt Manager

For a university subject, I was given a Linux image to use which comes with all the tools ready to go. All I had to do was download Virtual Box and run the VM. However, because I like QEMU, I wanted to see if I could get it to work in Virt Manager (the graphical front-end made by Red Hat).

While Virtual Box is great and all, I find it to be a bit problematic with constant kernel updates, especially in Fedora. I’ve made the switch to QEMU a few months ago and I haven’t looked back, its predictable, stable and very fast (at least for Linux distributions).

Enough back story, let’s get into it!

The Conversion

Firstly, navigate to the directory your .OVA file is stored in and open a terminal. Using the tar command, you need to extract its contents. Replace <image-name> with the name of your file, e.g. “linux_distro_amd64.ova”

tar -xvf <image-name>.ova

When extracted, you’ll get a number of files but we’re only interested in the .VMDK file. Next, assuming you have QEMU / virt-manager already installed, we need to convert the VMDK to a QCOW2 image. Be patient as it will take a long time depending on the size of your image and the processing power of your computer.

qemu-img convert <image-name>-disk001.vmdk <image-name>.qcow2 -O qcow2

Once completed, you should verify that the file is successfully a QEMU QCOW2 Image.

file <image-name>.qcow2

Finally, open up Virt Manager (Virtual Machine Manager?) and add your drive/image! If you haven’t configured any pools or VM destinations in virt-manager, you can copy the QCOW2 image to /var/lib/libvirt/images. Once you are happy with the new image, you can delete the other files (.OVA, .VMDK, etc.) as they aren’t needed.

Leave a comment

Your email address will not be published. Required fields are marked *

Blue Captcha Image
Refresh

*

One thought on “How To Convert OVA Image to QCOW2 – QEMU and Virt Manager”

  • Avatar