There is no native way (that I know of anyway) to simply import an ova file directly into KVM. An ova file is basically an archive file that contains virtual machine information. We can extract the files from this archive and convert the vmdk disks into qcow2 format and import into KVM.
In this example I’m using the librenms virtual machine that can be downloaded here. LibreNMS is an open source network monitoring system and is worth checking out.
First extract the files from the ova file.
The virtual disk extracted should be fairly obvious. It’s the vmdk file called librenms-centos-7.6-x86_64-disk001.vmdk. All we need to do now is convert the vmdk file to qcow2 using qemu-img.
You can verify the new format with the file command.
Now the real test. Import the qcow2 file into KVM. First I will move the file into /var/lib/libvirt/images.
I use virt-manager to manage my virtual machines. Create a new VM and select Import existing disk image. Select the qcow2 file and follow the rest of the prompts. The machine will start using the newly converted qcow2 disk image.