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
Created attachment 1372756 [details] failed-import-ova
Created attachment 1372757 [details] engine.log
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:]
Can you please share the OVA? Can you share the output of 'tar tvf <path_to_ova_file>'?
I see in the engine.log you tried to import esx6.0-rhel6.7-i386 - is it a folder?
(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!
(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.
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.
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.
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.