<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Thanks again Doug. With this direction, I have  started looking into details of both formats and also to convert OVF -> libvirt domain XML format. Will post the review once I get a satisfactory code to share with the community. <BR> <BR>Appreciate your support/suggestion.<BR> <BR>Thanks!<BR>Ata<br> <BR><div>> Date: Sun, 24 Jun 2012 17:27:03 -0500<br>> Subject: Re: [libvirt] Intend to add OVA installation API<br>> From: cardoe@cardoe.com<br>> To: ata.husain@hotmail.com<br>> CC: libvir-list@redhat.com<br>> <br>> On Sun, Jun 24, 2012 at 5:05 PM, Ata Bohra <ata.husain@hotmail.com> wrote:<br>> > Thanks Doug for your suggestions.<br>> ><br>> > I believe you are correct about the relation between OVA and OVF. But I am<br>> > not 100 % possitive about your suggestion: "defining an appropriate domain<br>> > in libvirt". To understand better I am sharing more details about my plans:<br>> ><br>> > 1. Enhance libvirt interface code (libvirt.c) to provide a<br>> > domain-independent routine: virDomainCreateOVA, an alternate API to create<br>> > domain.<br>> >     To make client code real simple, this routine can take ova path as input<br>> > and internally strip the OVA to extract required details. (planning to<br>> > define a struct to hold all essential<br>> >     information).<br>> > 2. Second, to enhance ESX driver to perform ESX specfic calls.<br>> ><br>> > Given OVA is a tar file, the parsing is just another file open/read<br>> > operation; it would be simple to perform it inside domain_conf.c (infact I<br>> > have written a parser to strip information off OVA already).<br>> ><br>> > Hope to get some comments/suggestions on above steps.<br>> ><br>> > Thanks!<br>> > Ata<br>> <br>> Right. I'm suggesting you don't go that route and approach the problem<br>> from another angle. I did a little Googling since my last e-mail to at<br>> least make sure I understood the basics. So an OVF looks like the<br>> following:<br>> <br>> virtualappliance/package.ovf<br>> virtualappliance/disk1.vmdk<br>> virtualappliance/disk2.vmdk<br>> virtualappliance/cdrom.iso<br>> virtualappliance/en-US-resources.xml<br>> <br>> An OVA would simply be a tar of the above and named<br>> virtualappliance.ova package.ovf is an XML file containing the<br>> description of the hardware of the virtual machine, much like the XML<br>> that libvirt stores about domains. While en-US-resources.xml would be<br>> the US English descriptions of the machine and its hardware.<br>> <br>> I'm suggesting you write an application that transforms package.ovf<br>> into libvirt's own domain XML format and simply call<br>> virDomainDefineXML() rather than adding API to libvirt itself. You<br>> could then further extend the application to allow you to take a<br>> libvirt domain and export it as a OVA.<br>> <br>> Looking at VMWare and Xen, they both treat OVA/OVF as a foreign format<br>> and require a converter application to import them to their native<br>> internals so it wouldn't be much different than their approach.<br>> <br>> Just my 2 cents.<br>> -- <br>> Doug Goldstein<br></div>                                         </div></body>
</html>