Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1572871

Summary: Can't import esxi6.5 OVA file on rhv4.2
Product: [oVirt] ovirt-engine Reporter: mxie <mxie>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.0CC: bugs, juzhou, kuwei, lsurette, michal.skrivanek, mxie, mzhan, ptoscano, rbalakri, Rhev-m-bugs, rjones, srevivo, tzheng, xiaodwan, ykaul
Target Milestone: ovirt-4.2.4Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-03 13:29:39 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:
Attachments:
Description Flags
rhv4.2-esxi6.5-ova
none
engine-esxi6.5-ova.log
none
vdsm-esxi6.5-ova.log
none
esxi6.5-rhel6.9-x86_64.ovf none

Description mxie@redhat.com 2018-04-28 10:13:17 UTC
Created attachment 1428018 [details]
rhv4.2-esxi6.5-ova

Description of problem:
Can't import esxi6.5 OVA file on rhv4.2

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.3.2-0.1.el7.noarch
vdsm-4.20.26-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 "rhv4.2-esxi6.5-ova"


Actual results:
As above description

Expected results:
Can import esxi6.5 OVA file on rhv4.2

Additional info:
Can import esxi6.0 OVA file on rhv4.2

Comment 1 mxie@redhat.com 2018-04-28 10:13:49 UTC
Created attachment 1428019 [details]
engine-esxi6.5-ova.log

Comment 2 mxie@redhat.com 2018-04-28 10:14:20 UTC
Created attachment 1428020 [details]
vdsm-esxi6.5-ova.log

Comment 3 Michal Skrivanek 2018-04-29 04:46:04 UTC
Can you please attach the OVF too?

Comment 4 mxie@redhat.com 2018-05-02 03:47:08 UTC
Created attachment 1429640 [details]
esxi6.5-rhel6.9-x86_64.ovf

Comment 6 Pino Toscano 2018-05-03 12:00:18 UTC
At least looking at the logs, it seems like it is a parsing issue in the rhv engine;
with virt-v2v 1.38.1 the result is:

$ virt-v2v -i ova esx6_5-rhel6.9-x86_64.ova --print-source
[   0.0] Opening the source -i ova esx6_5-rhel6.9-x86_64.ova
Source guest information (--print-source option):

    source name: esx6_5-rhel6.9-x86_64
hypervisor type: vmware
         memory: 2147483648 (bytes)
       nr vCPUs: 1
     CPU vendor: 
      CPU model: 
   CPU topology: sockets: 1 cores/socket: 1 threads/core: 1
   CPU features: 
       firmware: bios
        display: 
          video: 
          sound: 
disks:
        json:{ "file": { "driver": "raw", "offset": 512, "size": 1634378752, "file": { "driver": "file", "filename": "esx6_5-rhel6.9-x86_64.ova" } } } (vmdk) [scsi]
removable media:
        CD-ROM [sata] in slot 0
        Floppy in slot 0
NICs:
        Bridge "VM Network" [vmxnet3]

Comment 7 Michal Skrivanek 2018-05-03 13:09:30 UTC
vdsm parses it as
FINISH getExternalVmFromOva return={'status': {'message': 'Done', 'code': 0}, 'vmList': {'status': 'Down', 'disks': [{'allocation': None, 'capacity': '17179869184', 'type': 'disk', 'alias': 'esx6_5-rhel6.9-x86_64-1.vmdk'}], 'smp': 1, 'memSize': 2048, 'vmName': 'esx6_5-rhel6.9-x86_64', 'networks': [{'bridge': 'VM Network', 'model': 'VmxNet3', 'type': 'bridge', 'dev': 'Network adapter 1'}]}}

Comment 8 Michal Skrivanek 2018-05-03 13:11:59 UTC
then fails with 
2018-05-03 16:08:36,123+03 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery] (default task-87) [e9736d2e-148a-4847-b572-fd97e54ebcd4] Exception: org.ovirt.engine.
core.common.errors.EngineException: EngineException: java.lang.NumberFormatException: null (Failed with error ENGINE and code 5001)
        at org.ovirt.engine.core.bll.VdsHandler.handleVdsResult(VdsHandler.java:118) [bll.jar:]
...

which is the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1553112#c6

Comment 9 Michal Skrivanek 2018-05-03 13:29:39 UTC

*** This bug has been marked as a duplicate of bug 1553112 ***