Bug 1248996 - The Allocation size of guest qcow2 image file equals to its Capacity size on target host after migration with non-shared storage with full disk copy.
The Allocation size of guest qcow2 image file equals to its Capacity size on ...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: John Snow
Qianqian Zhu
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-31 05:57 EDT by Fangge Jin
Modified: 2017-07-06 00:34 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-31 07:27:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fangge Jin 2015-07-31 05:57:22 EDT
Description:
The guest image file has type=qcow2, the Allocation/Capacity size is 3.04GiB/9.00GiB, then do migration with non-shared storage with full disk copy. After migration, the Allocation/Capacity size of guest image file is 9.00GiB/9.00GiB on target host.

Version:
libvirt-1.2.17-3.el7.x86_64
qemu-kvm-rhev-2.3.0-13.el7.x86_64
kernel-3.10.0-300.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
0.Prepare two hosts: source(RHEL7.2) and target(RHEL7.2)

1.Prepare a running guest on source host with qcow2 image file:
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/rhel7-5.qcow2'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>

2.Check the vol-info of guest image file on source host:
# virsh vol-info /var/lib/libvirt/images/rhel7-5.qcow2
Name:           rhel7-5.qcow2
Type:           file
Capacity:       9.00 GiB
Allocation:     3.04 GiB

3.Migrate the guest to target host(Note: don't pre-create storage on target):
# virsh migrate --live rhel7-5 qemu+ssh://10.66.4.141/system --copy-storage-all --verbose
Migration: [100 %]

4.Check the vol-info of guest image file on tartget host:
# virsh vol-info /var/lib/libvirt/images/rhel7-5.qcow2
Name:           rhel7-5.qcow2
Type:           file
Capacity:       9.00 GiB
Allocation:     9.00 GiB

Actual results:
Compare the result of step2 and step4, to find that the Allocation size equals to the Capacity on target host.

Expected results:
The Allocation size of the guest image file on target host should be same with on source host.
Comment 2 Peter Krempa 2015-07-31 07:27:30 EDT

*** This bug has been marked as a duplicate of bug 1219541 ***
Comment 4 Vasiliy G Tolstov 2017-05-10 15:05:26 EDT
qemu 2.6.0 and libvirt 3.3.0 have identical issue.
Comment 5 John Snow 2017-05-11 10:13:29 EDT
I've investigated some of the root causes of this and posted a long explanation in a related BZ, https://bugzilla.redhat.com/show_bug.cgi?id=1219541

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