<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"><<a href="mailto:jiri.slezka@slu.cz" target="_blank">jiri.slezka@slu.cz</a>></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>
><br>
><br>
> On Tue, Feb 20, 2018 at 3:49 PM, Jiří Sléžka <<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a><br>
</span><span class="gmail-">> <mailto:<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a>>> wrote:<br>
><br>
> Hi Arik,<br>
><br>
> On 02/20/2018 01:22 PM, Arik Hadas wrote:<br>
> ><br>
> ><br>
> > On Tue, Feb 20, 2018 at 2:03 PM, Jiří Sléžka <<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a> <mailto:<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a>><br>
</span><div><div class="gmail-h5">> > <mailto:<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a> <mailto:<a href="mailto:jiri.slezka@slu.cz">jiri.slezka@slu.cz</a>>>> wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> ><br>
> > Hi Jiří,<br>
> > <br>
> ><br>
> ><br>
> > I would like to try import some ova files into our oVirt instance [1]<br>
> > [2] but I facing problems.<br>
> ><br>
> > I have downloaded all ova images into one of hosts (ovirt01) into<br>
> > direcory /ova<br>
> ><br>
> > ll /ova/<br>
> > total 6532872<br>
> > -rw-r--r--. 1 vdsm kvm 1160387072 Feb 16 16:21 HAAS-hpcowrie.ovf<br>
> > -rw-r--r--. 1 vdsm kvm 1111785984 Feb 16 16:22 HAAS-hpdio.ova<br>
> > -rw-r--r--. 1 vdsm kvm 846736896 Feb 16 16:22 HAAS-hpjdwpd.ova<br>
> > -rw-r--r--. 1 vdsm kvm 891043328 Feb 16 16:23 HAAS-hptelnetd.ova<br>
> > -rw-r--r--. 1 vdsm kvm 908222464 Feb 16 16:23 HAAS-hpuchotcp.ova<br>
> > -rw-r--r--. 1 vdsm kvm 880643072 Feb 16 16:24 HAAS-hpuchoudp.ova<br>
> > -rw-r--r--. 1 vdsm kvm 890833920 Feb 16 16:24 HAAS-hpuchoweb.ova<br>
> ><br>
> > Then I tried to import them - from host ovirt01 and directory /ova but<br>
> > spinner spins infinitly and nothing is happen.<br>
> ><br>
> ><br>
> > And does it work when you provide a path to the actual ova file, i.e.,<br>
> > /ova/HAAS-hpdio.ova, rather than to the directory?<br>
><br>
> this time it ends with "Failed to load VM configuration from OVA file:<br>
> /ova/HAAS-hpdio.ova" error. <br>
><br>
><br>
> Note that the logic that is applied on a specified folder is "try<br>
> fetching an 'ova folder' out of the destination folder" rather than<br>
> "list all the ova files inside the specified folder". It seems that you<br>
> 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 "Path to ova file"<br>
instead of "Path" :-)<br></blockquote><div><br></div><div>Sorry, I obviously meant 'latter' rather than 'former' 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>
> > I cannot see anything relevant in vdsm log of host ovirt01.<br>
> ><br>
> > In the engine.log of our standalone ovirt manager is just this<br>
> > relevant line<br>
> ><br>
> > 2018-02-20 12:35:04,289+01 INFO<br>
> > [org.ovirt.engine.core.<wbr>common.utils.ansible.<wbr>AnsibleExecutor] (default<br>
> > task-31) [458990a7-b054-491a-904e-<wbr>5c4fe44892c4] Executing Ansible<br>
> > command: ANSIBLE_STDOUT_CALLBACK=<wbr>ovaqueryplugin<br>
> > [/usr/bin/ansible-playbook,<br>
> > --private-key=/etc/pki/ovirt-<wbr>engine/keys/engine_id_rsa,<br>
> > --inventory=/tmp/ansible-<wbr>inventory8237874608161160784,<br>
> > --extra-vars=ovirt_query_ova_<wbr>path=/ova,<br>
> > /usr/share/ovirt-engine/<wbr>playbooks/ovirt-ova-query.yml] [Logfile:<br>
> > /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>> <<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>><br>
> > <<a href="http://20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://20180220123504-<wbr>ovirt01.net</a><br>
<div><div class="gmail-h5">> <<a href="http://20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://20180220123504-<wbr>ovirt01.net</a>>>.slu.cz.log]<br>
> ><br>
> > also there are two ansible processes which are still running<br>
> (and makes<br>
> > heavy load on system (load 9+ and growing, it looks like it<br>
> eats all the<br>
> > memory and system starts swapping))<br>
> ><br>
> > ovirt 32087 3.3 0.0 332252 5980 ? Sl 12:35 0:41<br>
> > /usr/bin/python2 /usr/bin/ansible-playbook<br>
> > --private-key=/etc/pki/ovirt-<wbr>engine/keys/engine_id_rsa<br>
> > --inventory=/tmp/ansible-<wbr>inventory8237874608161160784<br>
> > --extra-vars=ovirt_query_ova_<wbr>path=/ova<br>
> > /usr/share/ovirt-engine/<wbr>playbooks/ovirt-ova-query.yml<br>
> > ovirt 32099 57.5 78.9 15972880 11215312 ? R 12:35 11:52<br>
> > /usr/bin/python2 /usr/bin/ansible-playbook<br>
> > --private-key=/etc/pki/ovirt-<wbr>engine/keys/engine_id_rsa<br>
> > --inventory=/tmp/ansible-<wbr>inventory8237874608161160784<br>
> > --extra-vars=ovirt_query_ova_<wbr>path=/ova<br>
> > /usr/share/ovirt-engine/<wbr>playbooks/ovirt-ova-query.yml<br>
> ><br>
> > playbook looks like<br>
> ><br>
> > - hosts: all<br>
> > remote_user: root<br>
> > gather_facts: no<br>
> ><br>
> > roles:<br>
> > - ovirt-ova-query<br>
> ><br>
> > and it looks like it only runs query_ova.py but on all hosts?<br>
> ><br>
> ><br>
> > No, the engine provides ansible the host to run on when it<br>
> executes the<br>
> > playbook.<br>
> > It would only be executed on the selected host.<br>
> > <br>
> ><br>
> ><br>
> > How does this work? ...or should it work?<br>
> ><br>
> ><br>
> > It should, especially that part of querying the OVA and is supposed to<br>
> > be really quick.<br>
> > Can you please share the engine log and<br>
> ><br>
> /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>> <<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>><br>
> > <<a href="http://20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://20180220123504-<wbr>ovirt01.net</a><br>
<span class="gmail-">> <<a href="http://20180220123504-ovirt01.net" rel="noreferrer" target="_blank">http://20180220123504-<wbr>ovirt01.net</a>>>.slu.cz.log ?<br>
><br>
> engine log is here:<br>
><br>
> <a href="https://pastebin.com/nWWM3UUq" rel="noreferrer" target="_blank">https://pastebin.com/nWWM3UUq</a><br>
><br>
><br>
> Thanks.<br>
> Alright, so now the configuration is fetched but its processing fails.<br>
> We fixed many issues in this area recently, but it appears that<br>
> something is wrong with the actual size of the disk within the ovf file<br>
> that resides inside this ova file.<br>
> 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't do anything that violates the OVF specification but they do some non-common things that we don't anticipate:</div><div><br></div><div>First, they don'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="X" (and change ovf:capacity as I'll describe next) to the Disk element inside the DiskSection and pack the OVA again (tar cvf <ovf_file> <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're using a file storage or you don'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="21474836480" 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'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="20" 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>
> file<br>
> /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>
> <<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>><br>
<span class="gmail-">> in the fact does not exists (nor folder /var/log/ovirt-engine/ova/)<br>
><br>
><br>
> This issue is also resolved in 4.2.2.<br>
> In the meantime, please create the /var/log/ovirt-engine/ova/ folder<br>
> manually and make sure its permissions match the ones of the other<br>
> 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'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>
> Cheers,<br>
><br>
> Jiri Slezka<br>
><br>
> > <br>
> ><br>
> ><br>
> > I am using latest 4.2.1.7-1.el7.centos version<br>
> ><br>
> > Cheers,<br>
> > Jiri Slezka<br>
> ><br>
> ><br>
> > [1] <a href="https://haas.cesnet.cz/#!index.md" rel="noreferrer" target="_blank">https://haas.cesnet.cz/#!<wbr>index.md</a> <<a href="https://haas.cesnet.cz/#!index.md" rel="noreferrer" target="_blank">https://haas.cesnet.cz/#!<wbr>index.md</a>><br>
> > <<a href="https://haas.cesnet.cz/#!index.md" rel="noreferrer" target="_blank">https://haas.cesnet.cz/#!<wbr>index.md</a><br>
> <<a href="https://haas.cesnet.cz/#!index.md" rel="noreferrer" target="_blank">https://haas.cesnet.cz/#!<wbr>index.md</a>>> - Cesnet HAAS<br>
> > [2] <a href="https://haas.cesnet.cz/downloads/release-01/" rel="noreferrer" target="_blank">https://haas.cesnet.cz/<wbr>downloads/release-01/</a><br>
> <<a href="https://haas.cesnet.cz/downloads/release-01/" rel="noreferrer" target="_blank">https://haas.cesnet.cz/<wbr>downloads/release-01/</a>><br>
> > <<a href="https://haas.cesnet.cz/downloads/release-01/" rel="noreferrer" target="_blank">https://haas.cesnet.cz/<wbr>downloads/release-01/</a><br>
> <<a href="https://haas.cesnet.cz/downloads/release-01/" rel="noreferrer" target="_blank">https://haas.cesnet.cz/<wbr>downloads/release-01/</a>>> - Image repository<br>
> ><br>
> ><br>
> > _____________________________<wbr>__________________<br>
> > Users mailing list<br>
> > <a href="mailto:Users@ovirt.org">Users@ovirt.org</a> <mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>><br>
</span>> <mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a> <mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>>><br>
<div class="gmail-HOEnZb"><div class="gmail-h5">> > <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</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>
> > <<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</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>
> ><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a> <mailto:<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>
> <<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a>><br>
><br>
><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>