<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 20, 2018 at 6:37 PM, Jiří Sléžka <span dir="ltr">&lt;<a href="mailto:jiri.slezka@slu.cz" target="_blank">jiri.slezka@slu.cz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 02/20/2018 03:48 PM, Arik Hadas wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Feb 20, 2018 at 3:49 PM, Jiří Sléžka &lt;<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a><br>
</span><span class="gmail-">&gt; &lt;mailto:<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Hi Arik,<br>
&gt;<br>
&gt;     On 02/20/2018 01:22 PM, Arik Hadas wrote:<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; On Tue, Feb 20, 2018 at 2:03 PM, Jiří Sléžka &lt;<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a> &lt;mailto:<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a>&gt;<br>
</span><div><div class="gmail-h5">&gt;     &gt; &lt;mailto:<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a> &lt;mailto:<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a>&gt;&gt;&gt; wrote:<br>
&gt;     &gt;<br>
&gt;     &gt;     Hi,<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; Hi Jiří,<br>
&gt;     &gt;  <br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     I would like to try import some ova files into our oVirt instance [1]<br>
&gt;     &gt;     [2] but I facing problems.<br>
&gt;     &gt;<br>
&gt;     &gt;     I have downloaded all ova images into one of hosts (ovirt01) into<br>
&gt;     &gt;     direcory /ova<br>
&gt;     &gt;<br>
&gt;     &gt;     ll /ova/<br>
&gt;     &gt;     total 6532872<br>
&gt;     &gt;     -rw-r--r--. 1 vdsm kvm 1160387072 Feb 16 16:21 HAAS-hpcowrie.ovf<br>
&gt;     &gt;     -rw-r--r--. 1 vdsm kvm 1111785984 Feb 16 16:22 HAAS-hpdio.ova<br>
&gt;     &gt;     -rw-r--r--. 1 vdsm kvm  846736896 Feb 16 16:22 HAAS-hpjdwpd.ova<br>
&gt;     &gt;     -rw-r--r--. 1 vdsm kvm  891043328 Feb 16 16:23 HAAS-hptelnetd.ova<br>
&gt;     &gt;     -rw-r--r--. 1 vdsm kvm  908222464 Feb 16 16:23 HAAS-hpuchotcp.ova<br>
&gt;     &gt;     -rw-r--r--. 1 vdsm kvm  880643072 Feb 16 16:24 HAAS-hpuchoudp.ova<br>
&gt;     &gt;     -rw-r--r--. 1 vdsm kvm  890833920 Feb 16 16:24 HAAS-hpuchoweb.ova<br>
&gt;     &gt;<br>
&gt;     &gt;     Then I tried to import them - from host ovirt01 and directory /ova but<br>
&gt;     &gt;     spinner spins infinitly and nothing is happen.<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; And does it work when you provide a path to the actual ova file, i.e.,<br>
&gt;     &gt; /ova/HAAS-hpdio.ova, rather than to the directory?<br>
&gt;<br>
&gt;     this time it ends with &quot;Failed to load VM configuration from OVA file:<br>
&gt;     /ova/HAAS-hpdio.ova&quot; error. <br>
&gt;<br>
&gt;<br>
&gt; Note that the logic that is applied on a specified folder is &quot;try<br>
&gt; fetching an &#39;ova folder&#39; out of the destination folder&quot; rather than<br>
&gt; &quot;list all the ova files inside the specified folder&quot;. It seems that you<br>
&gt; expected the former output since there are no disks in that folder, right?<br>
<br>
</div></div>yes, It would be more user friendly to list all ova files and then<br>
select which one to import (like listing all vms in vmware import)<br>
<br>
Maybe description of path field in manager should be &quot;Path to ova file&quot;<br>
instead of &quot;Path&quot; :-)<br></blockquote><div><br></div><div>Sorry, I obviously meant &#39;latter&#39; rather than &#39;former&#39; before..</div><div>Yeah, I agree that would be better, at least until listing the OVA files in the folder is implemented (that was the original plan, btw) - could you please file a bug?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<span class="gmail-"><br>
&gt;     &gt;     I cannot see anything relevant in vdsm log of host ovirt01.<br>
&gt;     &gt;<br>
&gt;     &gt;     In the engine.log of our standalone ovirt manager is just this<br>
&gt;     &gt;     relevant line<br>
&gt;     &gt;<br>
&gt;     &gt;     2018-02-20 12:35:04,289+01 INFO<br>
&gt;     &gt;     [org.ovirt.engine.core.<wbr>common.utils.ansible.<wbr>AnsibleExecutor] (default<br>
&gt;     &gt;     task-31) [458990a7-b054-491a-904e-<wbr>5c4fe44892c4] Executing Ansible<br>
&gt;     &gt;     command: ANSIBLE_STDOUT_CALLBACK=<wbr>ovaqueryplugin<br>
&gt;     &gt;     [/usr/bin/ansible-playbook,<br>
&gt;     &gt;     --private-key=/etc/pki/ovirt-<wbr>engine/keys/engine_id_rsa,<br>
&gt;     &gt;     --inventory=/tmp/ansible-<wbr>inventory8237874608161160784,<br>
&gt;     &gt;     --extra-vars=ovirt_query_ova_<wbr>path=/ova,<br>
&gt;     &gt;     /usr/share/ovirt-engine/<wbr>playbooks/ovirt-ova-query.yml] [Logfile:<br>
&gt;     &gt;     /var/log/ovirt-engine/ova/<a href="http://ovirt-query-ova-ansible-20180220123504-ovirt01.net" rel="noreferrer" target="_blank">ovi<wbr>rt-query-ova-ansible-<wbr>20180220123504-ovirt01.net</a><br>
</span>&gt;     &lt;<a href="http://ovirt-query-ova-ansible-20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://ovirt-query-ova-<wbr>ansible-20180220123504-<wbr>ovirt01.net</a>&gt;<br>
&gt;     &gt;     &lt;<a href="http://20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://20180220123504-<wbr>ovirt01.net</a><br>
<div><div class="gmail-h5">&gt;     &lt;<a href="http://20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://20180220123504-<wbr>ovirt01.net</a>&gt;&gt;.slu.cz.log]<br>
&gt;     &gt;<br>
&gt;     &gt;     also there are two ansible processes which are still running<br>
&gt;     (and makes<br>
&gt;     &gt;     heavy load on system (load 9+ and growing, it looks like it<br>
&gt;     eats all the<br>
&gt;     &gt;     memory and system starts swapping))<br>
&gt;     &gt;<br>
&gt;     &gt;     ovirt    32087  3.3  0.0 332252  5980 ?        Sl   12:35   0:41<br>
&gt;     &gt;     /usr/bin/python2 /usr/bin/ansible-playbook<br>
&gt;     &gt;     --private-key=/etc/pki/ovirt-<wbr>engine/keys/engine_id_rsa<br>
&gt;     &gt;     --inventory=/tmp/ansible-<wbr>inventory8237874608161160784<br>
&gt;     &gt;     --extra-vars=ovirt_query_ova_<wbr>path=/ova<br>
&gt;     &gt;     /usr/share/ovirt-engine/<wbr>playbooks/ovirt-ova-query.yml<br>
&gt;     &gt;     ovirt    32099 57.5 78.9 15972880 11215312 ?   R    12:35  11:52<br>
&gt;     &gt;     /usr/bin/python2 /usr/bin/ansible-playbook<br>
&gt;     &gt;     --private-key=/etc/pki/ovirt-<wbr>engine/keys/engine_id_rsa<br>
&gt;     &gt;     --inventory=/tmp/ansible-<wbr>inventory8237874608161160784<br>
&gt;     &gt;     --extra-vars=ovirt_query_ova_<wbr>path=/ova<br>
&gt;     &gt;     /usr/share/ovirt-engine/<wbr>playbooks/ovirt-ova-query.yml<br>
&gt;     &gt;<br>
&gt;     &gt;     playbook looks like<br>
&gt;     &gt;<br>
&gt;     &gt;     - hosts: all<br>
&gt;     &gt;       remote_user: root<br>
&gt;     &gt;       gather_facts: no<br>
&gt;     &gt;<br>
&gt;     &gt;       roles:<br>
&gt;     &gt;         - ovirt-ova-query<br>
&gt;     &gt;<br>
&gt;     &gt;     and it looks like it only runs query_ova.py but on all hosts?<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; No, the engine provides ansible the host to run on when it<br>
&gt;     executes the<br>
&gt;     &gt; playbook.<br>
&gt;     &gt; It would only be executed on the selected host.<br>
&gt;     &gt;  <br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     How does this work? ...or should it work?<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; It should, especially that part of querying the OVA and is supposed to<br>
&gt;     &gt; be really quick.<br>
&gt;     &gt; Can you please share the engine log and<br>
&gt;     &gt;<br>
&gt;     /var/log/ovirt-engine/ova/<a href="http://ovirt-query-ova-ansible-20180220123504-ovirt01.net" rel="noreferrer" target="_blank">ovir<wbr>t-query-ova-ansible-<wbr>20180220123504-ovirt01.net</a><br>
</div></div>&gt;     &lt;<a href="http://ovirt-query-ova-ansible-20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://ovirt-query-ova-<wbr>ansible-20180220123504-<wbr>ovirt01.net</a>&gt;<br>
&gt;     &gt; &lt;<a href="http://20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://20180220123504-<wbr>ovirt01.net</a><br>
<span class="gmail-">&gt;     &lt;<a href="http://20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://20180220123504-<wbr>ovirt01.net</a>&gt;&gt;.slu.cz.log ?<br>
&gt;<br>
&gt;     engine log is here:<br>
&gt;<br>
&gt;     <a href="https://pastebin.com/nWWM3UUq" rel="noreferrer" target="_blank">https://pastebin.com/nWWM3UUq</a><br>
&gt;<br>
&gt;<br>
&gt; Thanks.<br>
&gt; Alright, so now the configuration is fetched but its processing fails.<br>
&gt; We fixed many issues in this area recently, but it appears that<br>
&gt; something is wrong with the actual size of the disk within the ovf file<br>
&gt; that resides inside this ova file.<br>
&gt; Can you please share that ovf file that resides inside /ova/HAAS-hpdio.ova?<br>
<br>
</span>file HAAS-hpdio.ova<br>
HAAS-hpdio.ova: POSIX tar archive (GNU)<br>
<br>
[root@ovirt01 backup]# tar xvf HAAS-hpdio.ova<br>
HAAS-hpdio.ovf<br>
HAAS-hpdio-disk001.vmdk<br>
<br>
file HAAS-hpdio.ovf is here:<br>
<br>
<a href="https://pastebin.com/80qAU0wB" rel="noreferrer" target="_blank">https://pastebin.com/80qAU0wB</a></blockquote><div><br></div><div>Thanks again.</div><div>So that seems to be a VM that was exported from Virtual Box, right?</div><div>They don&#39;t do anything that violates the OVF specification but they do some non-common things that we don&#39;t anticipate:</div><div><br></div><div>First, they don&#39;t specify the actual size of the disk and the current code in oVirt relies on that property.</div><div>There is a workaround for this though: you can extract an OVA file, edit its OVF configuration - adding ovf:populatedSize=&quot;X&quot; (and change ovf:capacity as I&#39;ll describe next) to the Disk element inside the DiskSection and pack the OVA again (tar cvf &lt;ovf_file&gt; &lt;disk_file) where X is either:</div><div>1. the actual size of the vmdk file + some buffer (iirc, we used to take 15% of extra space for the conversion)</div><div>2. if you&#39;re using a file storage or you don&#39;t mind consuming more storage space on your block storage, simply set X to the virtual size of the disk (in bytes) as indicated by the ovf:capacity filed, e.g., ovf:populatedSize=&quot;21474836480&quot; in the case of HAAS-hpdio.ova.</div><div><br></div><div>Second, the virtual size (indicated by ovf:capacity) is specified in bytes. The specification says that the default unit of allocation shall be bytes, but practically every OVA file that I&#39;ve ever saw specified it in GB and the current code in oVirt kind of assumes that this is the case without checking the ovf:capacityAllocationUnits attribute that could indicate the real unit of allocation [1].</div><div>Anyway, long story short, the virtual size of the disk should currently be specified in GB, e.g., ovf:populatedSize=&quot;20&quot; in the case of HAAS-hpdio.ova.</div><div><br></div><div>That should do it. If not, please share the OVA file and I will examine it in my environment.</div><div><br></div><div>[1] <a href="https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfOvaReader.java#L220">https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfOvaReader.java#L220</a></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>
<br>
&gt;     file<br>
&gt;     /var/log/ovirt-engine/ova/<a href="http://ovirt-query-ova-ansible-20180220123504-ovirt01.net" rel="noreferrer" target="_blank">ovir<wbr>t-query-ova-ansible-<wbr>20180220123504-ovirt01.net</a><br>
&gt;     &lt;<a href="http://ovirt-query-ova-ansible-20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://ovirt-query-ova-<wbr>ansible-20180220123504-<wbr>ovirt01.net</a>&gt;<br>
<span class="gmail-">&gt;     in the fact does not exists (nor folder /var/log/ovirt-engine/ova/)<br>
&gt;<br>
&gt;<br>
&gt; This issue is also resolved in 4.2.2.<br>
&gt; In the meantime, please create the  /var/log/ovirt-engine/ova/ folder<br>
&gt; manually and make sure its permissions match the ones of the other<br>
&gt; folders in  /var/log/ovirt-engine.<br>
<br>
</span>ok, done. After another try there is this log file<br>
<br>
/var/log/ovirt-engine/ova/<wbr>ovirt-query-ova-ansible-<wbr><a href="http://20180220173005-ovirt01.net">20180220173005-ovirt01.net</a>.<wbr>slu.cz.log<br>
<br>
<a href="https://pastebin.com/M5J44qur" rel="noreferrer" target="_blank">https://pastebin.com/M5J44qur</a></blockquote><div><br></div><div>Is it the log of the execution of the ansible playbook that was provided with a path to the /ova folder?</div><div>I&#39;m interested in that in order to see how comes that its execution never completed.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>
<span class="gmail-"><br>
&gt;     Cheers,<br>
&gt;<br>
&gt;     Jiri Slezka<br>
&gt;<br>
&gt;     &gt;  <br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     I am using latest 4.2.1.7-1.el7.centos version<br>
&gt;     &gt;<br>
&gt;     &gt;     Cheers,<br>
&gt;     &gt;     Jiri Slezka<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     [1] <a href="https://haas.cesnet.cz/#!index.md" rel="noreferrer" target="_blank">https://haas.cesnet.cz/#!<wbr>index.md</a> &lt;<a href="https://haas.cesnet.cz/#!index.md" rel="noreferrer" target="_blank">https://haas.cesnet.cz/#!<wbr>index.md</a>&gt;<br>
&gt;     &gt;     &lt;<a href="https://haas.cesnet.cz/#!index.md" rel="noreferrer" target="_blank">https://haas.cesnet.cz/#!<wbr>index.md</a><br>
&gt;     &lt;<a href="https://haas.cesnet.cz/#!index.md" rel="noreferrer" target="_blank">https://haas.cesnet.cz/#!<wbr>index.md</a>&gt;&gt; - Cesnet HAAS<br>
&gt;     &gt;     [2] <a href="https://haas.cesnet.cz/downloads/release-01/" rel="noreferrer" target="_blank">https://haas.cesnet.cz/<wbr>downloads/release-01/</a><br>
&gt;     &lt;<a href="https://haas.cesnet.cz/downloads/release-01/" rel="noreferrer" target="_blank">https://haas.cesnet.cz/<wbr>downloads/release-01/</a>&gt;<br>
&gt;     &gt;     &lt;<a href="https://haas.cesnet.cz/downloads/release-01/" rel="noreferrer" target="_blank">https://haas.cesnet.cz/<wbr>downloads/release-01/</a><br>
&gt;     &lt;<a href="https://haas.cesnet.cz/downloads/release-01/" rel="noreferrer" target="_blank">https://haas.cesnet.cz/<wbr>downloads/release-01/</a>&gt;&gt; - Image repository<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     _____________________________<wbr>__________________<br>
&gt;     &gt;     Users mailing list<br>
&gt;     &gt;     <a href="mailto:Users@ovirt.org">Users@ovirt.org</a> &lt;mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>&gt;<br>
</span>&gt;     &lt;mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a> &lt;mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>&gt;&gt;<br>
<div class="gmail-HOEnZb"><div class="gmail-h5">&gt;     &gt;     <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
&gt;     &lt;<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a>&gt;<br>
&gt;     &gt;     &lt;<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
&gt;     &lt;<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a>&gt;&gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     ______________________________<wbr>_________________<br>
&gt;     Users mailing list<br>
&gt;     <a href="mailto:Users@ovirt.org">Users@ovirt.org</a> &lt;mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>&gt;<br>
&gt;     <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
&gt;     &lt;<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a>&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
</div></div><br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>