Page 1 of 1

Inspecting an OVA file ?

Posted: 23. Oct 2016, 12:58
by agodfrin
Is there a way to find out the contents of an OVA file ?

Things like the VM definition (memory, virtual disks, CPU, ...) but also the description, EULA etc.

Thanks

Re: Inspecting an OVA file ?

Posted: 23. Oct 2016, 13:06
by agodfrin
Sorry - got the answer. Just use VBoxManage import --dry-run. So easy when you know ...

Albert

Re: Inspecting an OVA file ?

Posted: 24. Oct 2016, 11:30
by mpack
Well, that works, but it isn't really an adequate answer to the question IMHO.

An OVA is just an archive (tar.gz) containing the OVF,VMDK, and perhaps a manifest.

So you can browse the contents with any archiving tool which supports the tgz format. Then of course the OVF can be inspected by any text editor.

The same tools can be used to create OVAs, though of course that takes more skill.

Re: Inspecting an OVA file ?

Posted: 4. Jan 2017, 13:06
by agodfrin
Actually an OVA file is not a tar.gz. It is really just a tar that contains the OVF file, compressed VMDK files, and a manifest:

Code: Select all

$ tar -tvf Spatial-Workshop.ova 
-rw-------  0 someone someone      16647 Oct 23 12:51 Spatial-Workshop.ovf
-rw-------  0 someone someone 7729410048 Oct 23 13:02 Spatial-Workshop-disk1.vmdk
-rw-------  0 someone someone        147 Oct 23 13:02 Spatial-Workshop.mf
So I can extract the ovf file like this:

Code: Select all

$ tar -xvf Spatial-Workshop.ova *.ovf
x Spatial-Workshop.ovf
and examine it using a text editor, or just using the VirtualBox client.

The VMDK files are in the "streamOptimized" format.

Re: Inspecting an OVA file ?

Posted: 4. Jan 2017, 14:08
by mpack
I see. Thanks for the correction. I don't use export/import a lot (at all in fact), so it's possible I was mistaken about what I noted back when I checked out the format, or perhaps there is more than one variant.

Re: Inspecting an OVA file ?

Posted: 4. Jan 2017, 14:38
by scottgus1
If Virtualbox is installed, and you use Import Appliance in the File menu, or you try to open the .ova file directly, the Virtualbox Import popup opens. You can view the settings of the guest before committing to import, then edit or cancel if you want.

But the ova is an archive file, whether tar or tar.gz. Tomayto tomahto :) If you want to open the .ova file outside of Virtualbox, and the command window chokes on the "tar" command posted above, because you're running Windows instead of Linux, and as of Windows 10 it will choke, you will need another program. 7-zip is free and opens .ova's directly (this is the one I use), and also there's MinGW/MSYS, Cygwin, and tartool, among others no doubt (not tested by me, see How_to_unpack_a_tar_file_in_Windows)