Bug 1056983 - virt-v2v OVA/OVF import fails when no (optional) ovf:populatedSize is specified
Summary: virt-v2v OVA/OVF import fails when no (optional) ovf:populatedSize is specified
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-23 09:58 UTC by Ronald van Zantvoort
Modified: 2015-08-27 14:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-15 15:48:06 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1056045 0 unspecified CLOSED virt-v2v OVA import fails when no (optional) manifest file is included 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1056126 0 unspecified CLOSED virt-v2v OVA/OVF import fails with 'MegaBytes' as memory allocation units 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1056534 0 unspecified CLOSED virt-v2v OVF/OVA import fails when disks aren't attached to either IDE or SCSI controllers 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1056640 0 unspecified CLOSED virt-v2v OVA/OVF import fails when no (optional) ovf:capacityAllocationUnits is specified 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1057006 0 unspecified CLOSED virt-v2v OVA/OVF import fails when no (optional) Name under VirtualSystem is specified 2021-02-22 00:41:40 UTC


Description Ronald van Zantvoort 2014-01-23 09:58:10 UTC
When an OVF file under it's DiskSection defines any disk without the ovf:populatedSize, import will fail with
Use of uninitialized value $usage in numeric gt (>) at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Connection/VMwareOVASource.pm line 400.
Use of uninitialized value $usage in numeric gt (>) at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Connection/VMwareOVASource.pm line 400.
Use of uninitialized value $usage in numeric gt (>) at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Connection/VMwareOVASource.pm line 400.
Use of uninitialized value $usage in numeric gt (>) at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Connection/VMwareOVASource.pm line 400.
Use of uninitialized value in subroutine entry at /usr/lib64/perl5/vendor_perl/Sys/Virt/Domain.pm line 51.
Target count required for Term::ProgressBar new
 at blib/lib/Class/MethodMaker/Engine.pm (autosplit into blib/lib/auto/Class/MethodMaker/Engine/new.al) line 957.

However, according to spec, the property is optional.

Version-Release number of selected component (if applicable):
Fedora 20 / virt-v2v 0.9.0

How reproducible:
Import an OVA/OVF with a DiskSection and a Disk in it without the ovf:populatedSize but with the ovf:capacity property

Actual results:
Import fails.

Expected results:
Import succeeds.

Additional info:
The OVF standard (http://www.dmtf.org/sites/default/files/standards/documents/DSP0243_1.0.0.pdf) defines:

"For non-empty disks, the actual used size of the disk may optionally be specified using the 
ovf:populatedSize attribute. The unit of this attribute is always bytes. ovf:populatedSize is 
allowed to be an estimate of used disk size but shall not be larger than ovf:capacity."

Comment 1 Ronald van Zantvoort 2014-01-23 09:59:56 UTC
Solvable by defining $usage in _get_volume as     

my $usage = _node_val($disk, '@ovf:populatedSize') || $size;

Comment 2 Richard W.M. Jones 2015-04-15 15:48:06 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:00 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.


Note You need to log in before you can comment on or make changes to this bug.