Description of problem: I am not able to import appliance OVA to 4.2 engine Version-Release number of selected component (if applicable): Software Version: 4.2.6.3-0.1.el7ev How reproducible: 100% Steps to Reproduce: 1. Compute > Virtual Machines > Import 2. Source: Virtual Appliance (OVA) 3. Path: /path/to/ova/on/your/host 4. Load 5. Will fail Actual results: Failed to load VM configuration from OVA file: /usr/share/ovirt-engine-appliance/rhvm-appliance-4.2-20180815.0.el7.ova Expected results: VM imported from OVA to engine succesfully. Additional info: VDSM error log: 2018-08-24 13:40:19,036+0200 ERROR (jsonrpc/4) [jsonrpc.JsonRpcServer] Internal server error (__init__:611) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 606, in _handle_request res = method(**params) File "/usr/lib/python2.7/site-packages/vdsm/rpc/Bridge.py", line 197, in _dynamicMethod result = fn(*methodArgs) File "<string>", line 2, in getExternalVmFromOva File "/usr/lib/python2.7/site-packages/vdsm/common/api.py", line 48, in method ret = func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/API.py", line 1480, in getExternalVmFromOva return v2v.get_ova_info(ova_path) File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 244, in get_ova_info _add_general_ovf_info(vm, root, ns, ova_path) File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1381, in _add_general_ovf_info raise V2VError('Error parsing ovf information: no memory size') V2VError: Error parsing ovf information: no memory size
The code searches for 'ovf:Item' while the ovf contains 'Item': >>> root.find('.//ovf:Item[rasd:ResourceType="%d"]/rasd:VirtualQuantity' % 4, ns) >>> root.find('.//Item[rasd:ResourceType="%d"]/rasd:VirtualQuantity' % 4, ns).text '16384' Not sure what should be changed in this case, the ovf or the v2v code, any ideas ?
(In reply to Yuval Turgeman from comment #1) > The code searches for 'ovf:Item' while the ovf contains 'Item': > > >>> root.find('.//ovf:Item[rasd:ResourceType="%d"]/rasd:VirtualQuantity' % 4, ns) > >>> root.find('.//Item[rasd:ResourceType="%d"]/rasd:VirtualQuantity' % 4, ns).text > '16384' > > Not sure what should be changed in this case, the ovf or the v2v code, any > ideas ? No idea. We just reported it does not work.
Tomas, any idea which one is correct?
Your OVF is wrong. It specifies the ovf namespace only for the Envelope element but not for the other. Simplest fix would be to add default namespace to the root element (i.e. Envelope). Well... except that if you do that you should also check if Engine still reads the default_display_type and default_boot_sequence correctly.
No idea, if they opened the bug now, I'm assuming it did... any idea, Pavol ?
I just got appliance blind testing during reorganization of team, I don't know if it worked before, I tested it, found it, so I reported it.
Yuval, correct me if I'm wrong, but OVF is generated automatically by imagefactory right?
(In reply to Sandro Bonazzola from comment #9) > Yuval, correct me if I'm wrong, but OVF is generated automatically by > imagefactory right? Yes, but it hasn't changed - we need to try and import an older appliance to see if it's something new
Reported here: https://github.com/redhat-imaging/imagefactory/issues/421
Moving to 4.3.2 not being identified as blocker for 4.3.1
Can somebody attach the complete OVF, please?
Created attachment 1620936 [details] ovf file for rhel-atomic-host
I checked the attached OVF and I see it uses the old 0.9 draft version (which is obvious as that's the only format supported on export domain). To be able use UI import or API upload it has to be changed to conform to newer version of the OVF specification. See the attached example -- especially notice the change how various Sections are defined.
Created attachment 1624711 [details] new version of OVF format
*** Bug 1571729 has been marked as a duplicate of this bug. ***
Can you please verify if this is now working for you?
still same error: 2020-09-09 15:08:09,574+0300 INFO (jsonrpc/2) [api.host] FINISH getExternalVmFromOva error=Error parsing ovf information: no memory siz e from=::ffff:10.35.71.91,55398, flow_id=06c5c31a-f437-48bb-bcfe-56c1d450ff79 (api:52) 2020-09-09 15:08:09,574+0300 ERROR (jsonrpc/2) [jsonrpc.JsonRpcServer] Internal server error (__init__:350) Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/yajsonrpc/__init__.py", line 345, in _handle_request res = method(**params) File "/usr/lib/python3.6/site-packages/vdsm/rpc/Bridge.py", line 198, in _dynamicMethod result = fn(*methodArgs) File "<decorator-gen-462>", line 2, in getExternalVmFromOva File "/usr/lib/python3.6/site-packages/vdsm/common/api.py", line 50, in method ret = func(*args, **kwargs) File "/usr/lib/python3.6/site-packages/vdsm/API.py", line 1501, in getExternalVmFromOva return v2v.get_ova_info(ova_path) File "/usr/lib/python3.6/site-packages/vdsm/v2v.py", line 241, in get_ova_info _add_general_ovf_info(vm, root, ns, ova_path) File "/usr/lib/python3.6/site-packages/vdsm/v2v.py", line 1381, in _add_general_ovf_info raise V2VError('Error parsing ovf information: no memory size') vdsm.v2v.V2VError: Error parsing ovf information: no memory size with: ovirt-engine-appliance-4.3-20200603.1.el7.ova on: vdsm-api-4.40.28-1.el8ev.noarch
Is this still an issue with rhvm-appliance from 4.4?
Moved out to 4.4.5 due to capacity
Shouldn't it be irrelevant? Or where should be the fix? On engine side or inside of uploaded image?
(In reply to Petr Kubica from comment #32) > Shouldn't it be irrelevant? > Or where should be the fix? On engine side or inside of uploaded image? Fix should be in the ova file content, so on rhvm-appliance side.
Closing due to capacity. If we'll have capacity we can consider reopening it.