Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Descriptionmxie@redhat.com
2015-08-27 07:08:01 UTC
Created attachment 1067556[details]
screenshots of guests
Description of problem:
Storage size of guest shows incorrect in virt-manager if lazy refcounts is false and disk type is volume
Version-Release number of selected component (if applicable):
How reproducible:
100%
Steps to Reproduce:
1.Create a guest disk
# qemu-img create -f qcow2 /var/lib/libvirt/images/test.img 10G
Formatting 'test.img', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536 lazy_refcounts=off
2.Check the guest disk:
# qemu-img info test.img
image: test.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
3.Define xml for test guest and set disk type is 'volume'
<disk type='volume' device='disk'>
<driver name='qemu' type='qcow2'/>
<source pool='default' volume='test.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
4.Import the test guest:
# virsh define test.xml
5.Check test guest's storage size shows 0.19M in virt-manager,please refer to screenshot of test
Actual results:
As above
Expected results:
Storage size of guest shows correct in virt-manager
Additional info:
1.If modify test guest's disk type from volume to file in test.xml, its storage size will show 10G in virt-manager,please refer to screenshot of test_modify, so the bug is related to disk type 'volume'
2.*Create another guest via virt-manager. name: generic,check generic guest's disk
# qemu-img info generic.qcow2
image: generic.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 2.2M
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: true
*Check generic guest's storage size shows 10G in virt-manager
*Modify generic guest's xml file to change disk type from file to volume
# virsh edit generic
<disk type='volume' device='disk'>
<driver name='qemu' type='qcow2'/>
<source pool='default' volume='generic.qcow2'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
*Check generic guest's storage size in virt-manager, it still shows 10G, please refer to screenshot of generic, the difference place with above is 'lazy refcounts: true', so this bug is not only related to 'disk type is volume' but also 'lazy refcounts is false'
I can reproduce this bug with package:
virt-manager-1.2.1-8.el7.noarch
virt-install-1.2.1-8.el7.noarch
Steps are the same as description above.
Then try to verify with new build:
virt-manager-1.4.0-1.el7.noarch
virt-install-1.4.0-1.el7.noarch
Steps:
1. Create a guest disk
# qemu-img create -f qcow2 /var/lib/libvirt/images/test.img 10G
Formatting '/var/lib/libvirt/images/test.img', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
2. Check the guest disk
# qemu-img info test.img
image: test.img
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
3. Edit the xml of test guest and Add a disk which disk type is 'volume'
#virsh edit test
<disk type='volume' device='disk'>
<driver name='qemu' type='qcow2'/>
<source pool='default' volume='test.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
4. Import the test guest:
# virsh define test.xml
5. Check test guest's storage size in virt-manager
Results:
1. The test guest's storage size in virt-manager is 10G.
According to the result above in the latest version of virt-manager, move this bug from ON_QA to VERIFIED.
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-2269.html
Created attachment 1067556 [details] screenshots of guests Description of problem: Storage size of guest shows incorrect in virt-manager if lazy refcounts is false and disk type is volume Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1.Create a guest disk # qemu-img create -f qcow2 /var/lib/libvirt/images/test.img 10G Formatting 'test.img', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536 lazy_refcounts=off 2.Check the guest disk: # qemu-img info test.img image: test.img file format: qcow2 virtual size: 10G (10737418240 bytes) disk size: 196K cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false 3.Define xml for test guest and set disk type is 'volume' <disk type='volume' device='disk'> <driver name='qemu' type='qcow2'/> <source pool='default' volume='test.img'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 4.Import the test guest: # virsh define test.xml 5.Check test guest's storage size shows 0.19M in virt-manager,please refer to screenshot of test Actual results: As above Expected results: Storage size of guest shows correct in virt-manager Additional info: 1.If modify test guest's disk type from volume to file in test.xml, its storage size will show 10G in virt-manager,please refer to screenshot of test_modify, so the bug is related to disk type 'volume' 2.*Create another guest via virt-manager. name: generic,check generic guest's disk # qemu-img info generic.qcow2 image: generic.qcow2 file format: qcow2 virtual size: 10G (10737418240 bytes) disk size: 2.2M cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: true *Check generic guest's storage size shows 10G in virt-manager *Modify generic guest's xml file to change disk type from file to volume # virsh edit generic <disk type='volume' device='disk'> <driver name='qemu' type='qcow2'/> <source pool='default' volume='generic.qcow2'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> *Check generic guest's storage size in virt-manager, it still shows 10G, please refer to screenshot of generic, the difference place with above is 'lazy refcounts: true', so this bug is not only related to 'disk type is volume' but also 'lazy refcounts is false'