<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 15, 2017 at 10:52 PM, Arik Hadas <span dir="ltr"><<a href="mailto:ahadas@redhat.com" target="_blank">ahadas@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="gmail-">On Mon, May 15, 2017 at 8:05 PM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On Sun, May 14, 2017 at 04:56:56PM +0300, Arik Hadas wrote:<br>
> Hi everyone,<br>
><br>
> We would like to share our plan for extending the currently provided<br>
> support for OVA files with:<br>
> 1. Support for uploading OVA.<br>
> 2. Support for exporting a VM/template as OVA.<br>
> 3. Support for importing OVA that was generated by oVirt (today, we only<br>
> support those that are VMware-compatible).<br>
> 4. Support for downloading OVA.<br>
><br>
> This can be found on the feature page<br>
</span>> <<a href="http://www.ovirt.org/develop/release-management/features/virt/enhance-import-export-with-ova/" rel="noreferrer" target="_blank">http://www.ovirt.org/develop/<wbr>release-management/features/vi<wbr>rt/enhance-import-export-with-<wbr>ova/</a>><br>
<span>> .<br>
><br>
> Your feedback and cooperation will be highly appreciated.<br>
<br>
</span>The plan as stated seems fine, but I have some reservations which I<br>
don't think are answered by the page:<br>
<br>
(1) How will oVirt know the difference between an OVA generated<br>
by oVirt and one generated by VMware (or indeed other sources)?<br>
A VMware OVF has an XML comment:<br>
<br>
<!--Generated by VMware ESX Server, [...] --><br>
<br>
but not any official metadata that I could see.</blockquote><div><br></div></span><div>So that's something that we have not decided on yet.</div><div>Indeed, we need some indication of the system that generated the OVA and it makes sense to have it inside the OVF. I thought about a field that is part of the VM configuration, like the "origin" field of VMs in ovirt-engine. Having a comment like you mentioned is also an option.</div><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
(By the way, I don't think importing via virt-v2v vs directly will be<br>
any quicker. The v2v conversion / device installation takes only a<br>
fraction of the time. Most of the time is consumed doing the format<br>
conversion from VMDK to qcow2. However you are correct that when you<br>
know that the source is oVirt/KVM, you should not run virt-v2v.)<br></blockquote><div><br></div></span><div>Note that the disks within the OVA will be of type qcow2. So not only that no v2v conversion / device installation is needed, but also no format conversion will be needed on the import and upload flows.</div><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
(2) I think you're going to have a lot of fun generating OVAs which<br>
work on VMware. As Yaniv says, the devices aren't the same so you'd<br>
be having to do some virt-v2v -like driver installation / registry<br>
modification. Plus the OVF file is essentially a VMware data dump<br>
encoded as XML. OVF isn't a real standard. I bet there are a million<br>
strange corner cases. Even writing VMDK files is full of pitfalls.<br>
<br>
VMware has a reasonable V2V import tool (actually their P2V tooling is<br>
very decent). Of course it's proprietary, but then so is their<br>
hypervisor. Maybe oVirt can drive their tools?<br></blockquote><div><br></div></span><div>No no, that fun is not part of the plan :)</div><div>The OVAs we'll generate are supposed to contain:</div><div>1. OVF - it should be similar to the one virt-v2v generates for oVirt (that is similar to the one we use internally in oVirt for snapshots and for backup within storage domains, i.e., OVF-stores). We will definitely need some extensions, like an indication that the OVA was generated by oVirt. We may make some tweaks here and there, like removing network interfaces from the list of resources. But we already are generally aligned with what the specification says about OVFs.</div><div><br></div><div>2. qcow2 disks - thus, no conversion (device installation) and no format conversion will be needed (we may consider to convert them to raw later on, since they are expected to be the base volumes of the disks, not sure it worth the effort though).</div></div></div></div></blockquote><div><br></div><div>I wonder if it's worth looking into several options when exporting:</div><div><div>1. Run virt-sysprep with 'harmless' operations such as 'abrt-data,backup-files,crash-data,tmp-files'</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"></div></div></div></blockquote></div><div>2. Run virt-sparsify on the disks. </div><div>3. Convert to compressed qcow2. In most cases it certainly can have a significant saving (1:2 should be reasonable, but some can get 1:6 even) of disk space (and later, file transfer times, etc).</div><div>If we are already converting, we can also convert from qcow2 to qcow2v3 (compat 0.1 to compat 1.1).</div><div><br></div><div>Y.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>I will add this to the feature page.</div><div><br></div><div>We are aware to the fact that with this design, the OVAs could not be directly consumed by others, like VMware. But this could make it easier for them to make the needed conversion - they won't need to query the VM configuration from oVirt and won't need to lookup the disks inside oVirt's storage domains. Anyway, we assume that this conversion is done by other tools.</div><span class="gmail-"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Rich.<br>
<span class="gmail-m_6684829818756216306HOEnZb"><font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer" target="_blank">http://people.redhat.com/~rjon<wbr>es</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
Fedora Windows cross-compiler. Compile Windows programs, test, and<br>
build Windows installers. Over 100 libraries supported.<br>
<a href="http://fedoraproject.org/wiki/MinGW" rel="noreferrer" target="_blank">http://fedoraproject.org/wiki/<wbr>MinGW</a><br>
</font></span></blockquote></span></div><br></div></div>
<br>______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br></blockquote></div><br></div></div>