On Thu, Oct 20, 2016 at 10:43:26PM +0200, Emmanuel Kasper wrote:
Hi
I've been looking for a standalone tool to create OVA/OVF VM files based
on a disk image and found none. So I was thinking to write my own.
Would you be interested in having such a tool in the libguestfs umbrella ?
There is this:
http://git.annexia.org/?p=import-to-ovirt.git
which can generate OVF, and with not very much extra work could
generate OVAs.
The problem is that OVF is not a reliable standard. Sure, there is a
standards organization behind it, but there is in practice no interop.
You have to know the target hypervisor in order to be able to create
OVF which will work, and the OVF is quite different for each target.
My aim is too have a free toolchain to build VirtualBox images for
Debian (for Vagrant to be more exact, see
https://wiki.debian.org/Teams/Cloud/VagrantBaseBoxes)
Interface for such a tool would be something like
disk2ova --memory 2G --controller sata --network E1000
myDiskImage.{raw,qcow2}
based on the command line switches, a XML ovf would be created and
packed with the disk image in a OVA file.
There is some python code around which does that, for example the ganeti
export code and imagefactory
https://github.com/redhat-imaging/imagefactory/blob/master/imagefactory_p...
but nothing available as a standalone tool.
I am afraid I can only contribute Perl code.
I've no objections to helping you to write such a tool. I don't think
we would want to ship it as part of libguestfs unless it was something
that had general utility (see above). However we could link to the
result from one of our web pages.
You should certainly have a look at the import-to-ovirt script too
since it considers some issues you may not have thought of.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org