Bug 1056045

Summary: virt-v2v OVA import fails when no (optional) manifest file is included
Product: [Community] Virtualization Tools Reporter: Ronald van Zantvoort <van.zantvoort>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, ptoscano, rbalakri, rjones, shavivi, van.zantvoort
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-15 15:47:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
(proposed) patch, although it's not a 100% nice one none

Description Ronald van Zantvoort 2014-01-21 13:15:32 UTC
Description of problem:
Some virtualization stacks export as OVA without including a .mf manifest file.
DTMF's official OVF spec (http://www.dmtf.org/standards/ovf) under 5.1 states that "An OVF package shall consist of the following (...) zero or one OVF manifest with extension .mf"

However, if no such manifest exists, virt-v2v will collapse with 
"Use of uninitialized value $mf_path in open at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Connection/VMwareOVASource.pm line 254."

Version-Release number of selected component (if applicable):
0.9.0 (latest from Fedora 20 repo)

How reproducible:
Attempt an import of an OVA without a .mf file in it

Actual results:
Use of uninitialized value $mf_path in open at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Connection/VMwareOVASource.pm line 254.
virt-v2v: Failed to open {path}: No such file or directory

Expected results:
Pass over manifest verification and proceed with the import

Comment 1 Ronald van Zantvoort 2014-01-21 15:49:04 UTC
Created attachment 853325 [details]
(proposed) patch, although it's not a 100% nice one

Simple check; if $mf_path remains empty, just return.

Comment 2 Richard W.M. Jones 2015-04-15 15:47:19 UTC
Hi, thanks for the bug report.  Unfortunately it is filed against a
very old version of virt-v2v (0.9) which we don't support at all.

Luckily there is a newer version which almost certainly fixes your
bug already.  It's available starting in Fedora 21.  If you still
experience this bug, please try with the new version, and reopen
if it still happens.

Comment 3 Ronald van Zantvoort 2015-08-27 14:33:21 UTC
(In reply to Richard W.M. Jones from comment #1)
> Unfortunately it is filed against a
> very old version of virt-v2v (0.9) 

Well, that tends to happen if you wait 16 months with a reply to a ready2commit submitted patch.