Bug 1508829

Summary: virt-v2v: Import OVA failed with engine.log: ERROR parsing OVF due to OVF error: cannot read 'VmInit' with value: null
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.1.7.4CC: bugs, danken, ipinto, nsimsolo, tjelinek
Target Milestone: ovirt-4.1.7Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.1+
rule-engine: blocker+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-13 12:27:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1503951    
Attachments:
Description Flags
Import starts at: 2017-11-02 10:53:31,581
none
engine.log, see 2017-11-02 10:55:47,864+02 ERROR
none
import.log none

Description Nisim Simsolo 2017-11-02 10:16:44 UTC
Description of problem:
When importing VMware OVA file, the import progress succeed (see import.log), but right after VM imported is deleted from Webadmin VMs tab.
Observing engine.log shows the next ERROR:
2017-11-02 10:55:47,864+02 ERROR [org.ovirt.engine.core.utils.ovf.OvfManager] (DefaultQuartzScheduler9) [3df7bb15] Error parsing OVF due to OVF error: esx5.5-rhel6.8-x86_64: cannot read 'VmInit' with value: null

This issue does is not reproduced with RHV 4.2 environment.

Version-Release number of selected component (if applicable):
ovirt-engine-4.1.7.5-0.1.el7
qemu-kvm-rhev-2.9.0-16.el7_4.8.x86_64
vdsm-4.19.36-1.el7ev.x86_64
libvirt-client-3.2.0-14.el7_4.3.x86_64
sanlock-3.5.0-1.el7.x86_64

How reproducible:
Consistently

Steps to Reproduce:
1. Browse Webadmin -> VMs tab -> import, select OVA and enter OVA path details.
2. Start Import
3.

Actual results:
Although import succeeded (according to import.log), VM is deleted right after the import ended. 
vdsm.log shows: 
2017-11-02 10:55:49,650+0200 INFO  (jsonrpc/0) [jsonrpc.JsonRpcServer] RPC call Host.deleteV2VJob succeeded in 0.00 seconds (__init__:539)
engine.log shows:   
2017-11-02 10:55:47,864+02 ERROR [org.ovirt.engine.core.utils.ovf.OvfManager] (DefaultQuartzScheduler9) [3df7bb15] Error parsing OVF due to OVF error: esx5.5-rhel6.8-x86_64: cannot read 'VmInit' with value: null
2017-11-02 10:55:47,916+02 INFO  [org.ovirt.engine.core.bll.exportimport.ConvertVmCommand] (DefaultQuartzScheduler9) [3df7bb15] failed to add devices to converted vm
Expected results:
It should be possible to import OVA files using import -> OVA procedure (from export domain it is possible to import 'virt-v2v -i ova' exported OVA file)

Additional info:
engine.log, vdsm.log and import.log attached
Bug https://bugzilla.redhat.com/show_bug.cgi?id=1508814 may be relevant for this issue.

Comment 1 Nisim Simsolo 2017-11-02 10:20:54 UTC
Created attachment 1346956 [details]
Import starts at: 2017-11-02 10:53:31,581

Comment 2 Nisim Simsolo 2017-11-02 10:22:05 UTC
Created attachment 1346957 [details]
engine.log, see  2017-11-02 10:55:47,864+02 ERROR

Comment 3 Nisim Simsolo 2017-11-02 10:22:39 UTC
Created attachment 1346958 [details]
import.log

Comment 4 Dan Kenigsberg 2017-11-02 14:38:07 UTC
Eitan has not seen anything like it when verifying bug 1503951, but it seems like another 4.1.7 blocker to me.

Comment 5 Red Hat Bugzilla Rules Engine 2017-11-02 14:38:12 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 6 Tomas Jelinek 2017-11-03 07:41:29 UTC
*** Bug 1508814 has been marked as a duplicate of this bug. ***

Comment 7 Michal Skrivanek 2017-11-03 07:58:55 UTC
Nisim, please use correct file suffix for your uploads

Comment 8 Michal Skrivanek 2017-11-03 08:45:53 UTC
Either reproduce with debug logging enabled or please retest with the fix for bug 1508327

Comment 9 Tomas Jelinek 2017-11-03 08:58:32 UTC
The error message is misleading, the issue is that the SimpleDependencyInjector.getInstance().get(OvfVmIconDefaultsProvider.class) returns null in OvfManager. Indeed should be solved by https://bugzilla.redhat.com/show_bug.cgi?id=1508327

Comment 10 Nisim Simsolo 2017-11-05 11:58:29 UTC
Verification build:
rhevm-4.1.7.6-0.1.el7
qemu-kvm-rhev-2.9.0-16.el7_4.8.x86_64
vdsm-4.19.36-1.el7ev.x86_64
libvirt-client-3.2.0-14.el7_4.3.x86_64
sanlock-3.5.0-1.el7.x86_64
virt-v2v-1.36.3-6.el7_4.3.x86_64

Verification scenarios:
1. Upload OVA to export domain using 'virt-v2v -i ova' command.
2. Browse Webadmin -> storage tab -> export domain -> VM import sub tab -> Select uploaded VM and Import it.
3. Verify import succeed. Verify correct VM configuratio, run VM and verify Vm is running properly.

----------------------

1. Browse webadmin -> VMs tab -> import, select OVA and enter OVA path details. start import.
2. Verify import succeed, Verify correct VM configuratio, run VM and verify Vm is running properly.