Closed ghost closed 6 days ago
I was missing an important detail: The .ova appliance stores the .vmdk files as compressed images. As discussed in #1112, it has to be decompressed to be fully usable.
As all this is quite some work, I'm not sure if it's worth it. I would close it.
The main issue with those OVAs are the compressed VMDK images. When they are left compressed, then qemu can use them only as a backing image. Uncompressing them is normally not a big issue. VirtualBox, VMware and QEMU (since v2.0) all have utilities to do that. But on the client side you can't be sure, that any one of them is installed. And on the server side (qemu-img is available) the uncompressing takes considerable disk space as during the conversion both the compressed and uncompressed image must be available.
As I would really like to easily use OVAs I finally wrote my own VMDK uncompress utility in python. It has the advantage, that it sequentially reads the compressed file (no seek). So it's not necessary to use extra disk space for temporarily storing the compressed image, it can read it on the fly. Furthermore it needs no external utilities, just plain python.
The drawback of course is, that it's totally new, so it might have some bugs. VMware has documented the image format in https://www.vmware.com/support/developer/vddk/vmdk_50_technote.pdf, so no reverse-engineering was necessary.
I've integrated the uncompress function into ova_import, so it can extract the images from the OVA file and uncompress them on the fly. As this is brand new, currently it had to be enabled by option -u
.
Currently the import appliance function is already capable of importing the images out of an ova appliance. But it still needs a gns3a file for the meta informations. Most of these informations are already available in the ovf part of the ova file.
So my proposal is to enhance the import wizard to be able to import an ova appliance without a gns3a file. That would ease the import of a lot of available ova appliances into GNS3. Furthermore such a function would make it simpler to migrate VMs from a local VirtualBox/VMware into the GNS3 VM.
Of course having a gns3a file is still the prefered way, the ovf lacks some imformation like the console type. Nevertheless having an ova import is a good start of using such a VM in GNS3.
I created a standalone application, that takes an ova, extracts the ovf information and creates a gns3a file. See https://git.bernhard-ehlers.de/ehlers/ova_import for my code.