Converting Debian/Ubuntu to oVirt

oVirt 3.6 will have a better way to import virtual machines. In the mean time, here is the best method for getting an already made ova into oVirt. The example I am using is the open source log analyzer – graylog.

A prerequisite is the script located at http://git.annexia.org/git/import-to-ovirt.git

git clone http://git.annexia.org/git/import-to-ovirt.git

Verify the type of the downloaded file:

file graylog.ova
graylog.ova: POSIX tar archive

This is wrapped archive, extract it.

tar xf graylog.ova

Whether converting from Hyper-V or OVA, the following steps will be the same except Hyper-V’s format will be vpc instead of vmdk

sudo qemu-img convert -f vmdk -O qcow2 graylog-disk1.vmdk graylog.qcow2

This line will import the image into oVirt.

sudo import-to-ovirt.pl graylog.qcow2 ovirt-nfs-storage:/exports/import_export

The VM can then be imported using the import tab of the storage domain where you uploaded the file.