Re: [Libguestfs] libguestfs and exporting to OVA/OVF

2016-12-07 Thread Emmanuel Kasper
Am 22. Oktober 2016 00:03:30 MESZ, schrieb Emmanuel Kasper :
>Le 21/10/2016 à 16:08, Richard W.M. Jones a écrit :
>> 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.
>
>
>Thanks for the hint for import-to-ovirt, the code is easy to read and
>follow, and is close to what I want to achieve.
>
>A good part of the script is ovirt specific but I am going to reuse the
>part where you generate the OVF file.
>
>I'll send you a link when I have something to show.
>
>___
>Libguestfs mailing list
>Libguestfs@redhat.com
>https://www.redhat.com/mailman/listinfo/libguestfs

So I adapted on my spare time import-to-ovirt and I have now my  import2vbox.
I had to adapt the generated ovf and disable the rh(e)v specific stuff but 
nothing extraordinary complicated.
Code is here:

https://github.com/EmmanuelKasper/import2vbox

Thanks for the initial pointer to import-to-ovirt

Emmanuel


-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] libguestfs and exporting to OVA/OVF

2016-10-22 Thread Emmanuel Kasper
Le 21/10/2016 à 16:08, Richard W.M. Jones a écrit :
> 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.


Thanks for the hint for import-to-ovirt, the code is easy to read and
follow, and is close to what I want to achieve.

A good part of the script is ovirt specific but I am going to reuse the
part where you generate the OVF file.

I'll send you a link when I have something to show.

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] libguestfs and exporting to OVA/OVF

2016-10-21 Thread Richard W.M. Jones
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_plugins/ovfcommon/ovfcommon.py#L69
> 
> 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

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] libguestfs and exporting to OVA/OVF

2016-10-21 Thread Emmanuel Kasper
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 ?

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_plugins/ovfcommon/ovfcommon.py#L69

but nothing available as a standalone tool.

I am afraid I can only contribute Perl code.

Emmanuel




___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs