Bug 1330916 - image cannot be fully allocated via qemu-img with sparse_size specified as 0
Summary: image cannot be fully allocated via qemu-img with sparse_size specified as 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Max Reitz
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-27 10:20 UTC by Ping Li
Modified: 2016-11-07 21:05 UTC (History)
15 users (show)

Fixed In Version: qemu-2.6.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 21:05:38 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2673 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2016-11-08 01:06:13 UTC

Description Ping Li 2016-04-27 10:20:38 UTC
Description of problem:
After convert the source image with the option "-S 0", the dest image will not be fully allocated.

Version-Release number of selected component (if applicable):
[root@ibm-x3650m3-03 test]# rpm -qa | grep qemu-img
qemu-img-rhev-2.5.0-4.el7.x86_64
[root@ibm-x3650m3-03 test]# uname -r
3.10.0-382.el7.x86_64

How reproducible:
3/3

Steps to Reproduce:
1.qemu-img create -f qcow2 src.qcow2 10G
2.qemu-img create -f qcow2 src.qcow2 10G
3.qemu-img convert -p -f qcow2 -O qcow2 -S 0 src.qcow2 dst.qcow2
4.qemu-img info dst.qcow2

Actual results:
[root@ibm-x3650m3-03 test]# qemu-img info dst.qcow2 
image: dst.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 2.1M
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
[root@ibm-x3650m3-03

Expected results:
disk size should be greater than or eqaul to the virtual size.

Additional info:
[root@ibm-x3650m3-03 test]# qemu-img info src.qcow2 
image: src.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

Comment 2 Max Reitz 2016-05-11 14:52:45 UTC
Fix will be included in 2.6.0.

Comment 4 Ping Li 2016-05-13 06:49:23 UTC
[root@hp-z420-02 home]# uname -r
3.10.0-396.el7.x86_64
[root@hp-z420-02 home]# rpm -qa | grep qemu-kvm
qemu-kvm-rhev-2.6.0-1.el7.x86_64
[root@hp-z420-02 home]# qemu-img create -f qcow2 src.qcow2 10G
Formatting 'src.qcow2', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
[root@hp-z420-02 home]# qemu-img convert -p -f qcow2 -O qcow2 -S 0 src.qcow2 dst.qcow2
    (100.00/100%)
[root@hp-z420-02 home]# qemu-img info src.qcow2 
image: src.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
[root@hp-z420-02 home]# qemu-img info dst.qcow2 
image: dst.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 10G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

Comment 6 errata-xmlrpc 2016-11-07 21:05:38 UTC
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.

https://rhn.redhat.com/errata/RHBA-2016-2673.html


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