Bug 1529255 - Can't import VMware OVA folder with EngineException: Failed to query OVA info
Summary: Can't import VMware OVA folder with EngineException: Failed to query OVA info
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.2.0.2
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.1
: ---
Assignee: Arik
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On: 1529965
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-27 10:40 UTC by mxie@redhat.com
Modified: 2019-04-25 10:40 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The new mechanism for querying OVF configuration from an OVA had no support for OVA folders. Consequence: A regression that prevents users from importing VMware-compatible OVA folders. Fix: Add support for OVA folders with the new querying mechanism. Result: oVirt is able to import VMware-compatible OVA folders.
Clone Of:
Environment:
Last Closed: 2018-02-12 11:56:02 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
failed-import-ova (deleted)
2017-12-27 10:40 UTC, mxie@redhat.com
no flags Details
failed-import-ova (31.78 KB, image/png)
2017-12-27 10:40 UTC, mxie@redhat.com
no flags Details
engine.log (16.96 KB, text/plain)
2017-12-27 10:41 UTC, mxie@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 85807 0 'None' MERGED ansible: support for an external ova in the form of a directory 2020-05-29 13:05:06 UTC

Description mxie@redhat.com 2017-12-27 10:40:18 UTC
Description of problem:
Can't import guest from ova at rhv4.2 GUI 

Version-Release number of selected component (if applicable):
RHV:4.2.0.2-0.1.el7
vdsm-4.20.9.3-1.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Import guest from ova file at rhv4.2 GUI 
Login rhv4.2 -> click dashboard-> click virtual machine -> select import -> choose "vmware application (OVA)" and input path info

2.Failed to import guest from ova as screenshot "failed-import-ova"


Actual results:
As above description

Expected results:
Can import guest from ova at rhv4.2 GUI 

Additional info:
Can't reproduce this problem on rhv4.1 and vdsm-4.19.34-1.el7ev.x86_64

Comment 1 mxie@redhat.com 2017-12-27 10:40:58 UTC
Created attachment 1372756 [details]
failed-import-ova

Comment 2 mxie@redhat.com 2017-12-27 10:41:27 UTC
Created attachment 1372757 [details]
engine.log

Comment 3 Yaniv Kaul 2017-12-27 10:47:40 UTC
Exception (please always include the first few lines of the stack trace in a comment!):
2017-12-27 05:30:01,960-05 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery] (default task-50) [1a317199-426b-49e9-a0e0-4d9c899f2580] Exception: org.ovirt.engine.core.common.errors.EngineException: EngineException: Failed to query OVA info (Failed with error GeneralException and code 100)
	at org.ovirt.engine.core.bll.GetVmFromOvaQuery.runAnsibleQueryOvaInfoPlaybook(GetVmFromOvaQuery.java:102) [bll.jar:]
	at org.ovirt.engine.core.bll.GetVmFromOvaQuery.executeQueryCommand(GetVmFromOvaQuery.java:44) [bll.jar:]
	at org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:106) [bll.jar:]
	at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) [dal.jar:]
	at org.ovirt.engine.core.bll.executor.DefaultBackendQueryExecutor.execute(DefaultBackendQueryExecutor.java:14) [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:579) [bll.jar:]

Comment 4 Arik 2017-12-27 12:17:15 UTC
Can you please share the OVA?
Can you share the output of 'tar tvf <path_to_ova_file>'?

Comment 7 Arik 2017-12-28 13:22:07 UTC
I see in the engine.log you tried to import esx6.0-rhel6.7-i386 - is it a folder?

Comment 8 mxie@redhat.com 2017-12-29 01:38:27 UTC
(In reply to Arik from comment #7)
> I see in the engine.log you tried to import esx6.0-rhel6.7-i386 - is it a
> folder?

No matter ova folder or vmware.ova,I can't import guest from ova in rhv4.2, also could reproduce the bug on another rhv4.2,could you please tell me what configuration you will set in registered host before importing ? Thanks!

Comment 9 Arik 2017-12-29 07:20:13 UTC
(In reply to mxie from comment #8)
> No matter ova folder or vmware.ova,I can't import guest from ova in rhv4.2,

It matters for us because it may indicate a different issue.

So I found that esx6.0-rhel6.7-i386 is a directory on your shared folder. Assuming that you tried to import that OVA directory, then yeah, that's something that is broken in the beta version and the posted patch is supposed to fix.

As to the failure to import an OVA tar file, I was able to successfully query one of the OVA files on your shared folder (the ubuntu one). But those OVA files are quite big and it takes me too much time to download them. Can you please be more specific and provide an OVA tar file that you didn't manage to import?

> also could reproduce the bug on another rhv4.2,could you please tell me what
> configuration you will set in registered host before importing ? Thanks!

So the process of importing OVA tar file that was created by other systems looks a bit different in 4.2.

Previously it was done like that:
1. ovirt-engine asks vdsm to retrieve the VM inside the OVA.
2. vdsm extracts the OVF from the OVA and converts it to a minimal VM.
3. ovirt-engine asks vdsm to convert the OVA.
4. vdsm triggers virt-v2v.

And now:
1. ovirt-engine queries the OVF within the OVA with Ansible.
2. ovirt-engine parses the OVF and detects that the OVA was generated by other system (rather than OVA that is generated by oVirt - new feature in 4.2).
3. ovirt-engine asks vdsm to convert the OVA.
4. vdsm triggers virt-v2v.

Steps 3 and 4 remained the same, i.e., the conversion itself using virt-v2v didn't change. Therefore, it is more likely that the query fails. We already know of one reason that the new query would fail on something that previously worked (bz 1528724, can it be that also in your OVA the OVF is not the first entry inside the tar file?).

No new configuration is needed on the registered host, we query the OVF using Ansible as root.

Comment 12 Arik 2018-01-01 08:24:15 UTC
Let's use this bz to track the fix for importing VMware-compatible OVA folder. The general failure in querying OVF from OVA (that happens also for OVA files oVirt generates) is tracked in bz 1529965.

Comment 13 Nisim Simsolo 2018-01-15 14:43:36 UTC
Verification build:
rhvm-4.2.1.1-0.1.el7
qemu-kvm-rhev-2.9.0-16.el7_4.13.x86_64
libvirt-client-3.2.0-14.el7_4.7.x86_64
vdsm-4.20.13-1.el7ev.x86_64
sanlock-3.5.0-1.el7.x86_64
virt-v2v-1.36.3-6.el7_4.3.x86_64

Verification scenario:
1. Browse Webadmin -> virtual machines -> more button -> import -> select OVA and enter OVF directory path (In my case I took OVF directory with extra VMware configuration). 
2. Click load and verify OVF queried properly (VM appears in import dialog).
3. Click next and verify VM parameters listed in the dialog are correct.
4. Click OK button and verify VM imported successfully and VM configuration is correct.
5. Run VM and verify Vm is running properly.

Note: Currently, OVA directory import process is done using fallback and not with the new mechanism. A new bug will be reported on this issue.

Comment 14 Sandro Bonazzola 2018-02-12 11:56:02 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.