Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 727489 - libvirtxml fails if a volume's size is greater than the size reported by qemu-img
libvirtxml fails if a volume's size is greater than the size reported by qemu...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-v2v (Show other bugs)
6.1
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Matthew Booth
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-02 05:35 EDT by masaya.hasegawa.hp
Modified: 2011-12-06 09:49 EST (History)
4 users (show)

See Also:
Fixed In Version: virt-v2v-0.8.2-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 09:49:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1615 normal SHIPPED_LIVE Low: virt-v2v security and bug fix update 2011-12-05 19:51:05 EST

  None (edit)
Description masaya.hasegawa.hp 2011-08-02 05:35:35 EDT
Description of problem:

Cannot convert xen local to kvm with useing virt-v2v command 
virt-v2v -i libvirtxml -op pool2  --bridge br0 skyhawk.xml
size (10485760000) < usage (10496020480) at /usr/share/perl5/vendor_perl/Sys/VirtV2V/Connection/LibVirtXMLSource.pm line 157, <$qemuimg> line 4.

Version-Release number of selected component (if applicable):

virt-v2v-0.7.1-3.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. virt-v2v -i libvirtxml -op <pool>  --bridge <bridge name> <xml file>

2.
3.
  
Actual results:
fail 

Expected results:
Convert locally vm successfully

Additional info:

# stat /temp2/xen/skyhawk
  File: `/temp2/xen/skyhawk'
  Size: 10485760000     Blocks: 20500040   IO Block: 4096   regular file
Device: 6815h/26645d    Inode: 16007172    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
...

size (10485760000) < usage (10496020480
20500040*512=10496020480

    146     if (-b $path) {
    147         $is_block = 1;
    148         $usage = $size;
    149         $is_sparse = 0;
    150     } else {
    151         $is_block = 0;
    152         my $st = stat($path);
    153         $usage = $st->blocks * 512;
    154         $is_sparse = $usage < $size ? 1 : 0;
    155     }
    156
    157     die("size ($size) < usage ($usage)") if $size < $usage;

Normally regular file size is less than disk usage if not sparse file.
So line 157 logic seems to be wrong. I think that it be removed.
In fact, after I commented out line 157, virt-v2v was success.
Comment 2 Matthew Booth 2011-08-02 06:49:07 EDT
This is fixed in upstream commit a2eacc7413a800e0e97f5f2e2bf8a43f192d69c0.
Comment 4 Huang Wenlong 2011-08-03 02:03:05 EDT
verify this bug with virt-v2v-0.8.2-1.el6

#virt-v2v -i libvirtxml -os r6 -b breth0 xen-hvm-win2003-i386.xml 

it can convert successfully  and boot

And the "die("size ($size) < usage ($usage)") if $size < $usage;"
already is removed from the source code
Comment 6 Huang Wenlong 2011-08-21 23:13:32 EDT
verify this bug in virt-v2v-0.8.3-1.el6 

# virt-v2v -i libvirtxml -os r6 -b breth0 xen-pv-rhel5.7-x86_64.xml 
xen-pv-rhel5.7-x86_64.img: 100% [====================================]D 0h02m12s
virt-v2v: xen-pv-rhel5.7-x86_64 configured with virtio drivers.

and check the source code  " die("size ($size) < usage ($usage)") if $size < $usage;" 
already removed .
Comment 7 errata-xmlrpc 2011-12-06 09:49:46 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1615.html

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