Bug 1415126 - virt-manager cannot show correct size and format for qcow2 image which not managed by dir-pool
Summary: virt-manager cannot show correct size and format for qcow2 image which not ma...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-manager
Version: 6.9
Hardware: x86_64
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-20 10:59 UTC by zhoujunqin
Modified: 2017-03-02 19:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-03-02 19:39:31 UTC
Target Upstream Version:

Attachments (Terms of Use)
screenshot-2 (129.77 KB, image/png)
2017-01-20 10:59 UTC, zhoujunqin
no flags Details
screenshot-1 (122.59 KB, image/png)
2017-01-20 11:00 UTC, zhoujunqin
no flags Details

Description zhoujunqin 2017-01-20 10:59:17 UTC
Created attachment 1242714 [details]

Description of problem:
virt-manager cannot show correct size and format for qcow2 image which not managed by dir-pool

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

How reproducible:

Steps to Reproduce:
1. Make sure there is no dir pool using path:  /var/test1/

2. Create a new qcow2 image under path: /var/test1/
# qemu-img create -f qcow2 /var/test1/testjuzhou.img +6G
Formatting '/var/test1/testjuzhou.img', fmt=qcow2 size=6442450944 encryption=off cluster_size=65536 

# qemu-img info /var/test1/testjuzhou.img 
image: /var/test1/testjuzhou.img
file format: qcow2
virtual size: 6.0G (6442450944 bytes)
disk size: 196K
cluster_size: 65536

3. Then launch virt-manager to install a guest on this existing qcow2 image.
# virt-manager
In "step 4 of 5", choose "Select managed or other existing storage", input "/var/test1/testjuzhou.img", then click "Forward".

In "step 5 of 5" page, it shows: Storage: 0.0 GB  /var/test1/testjuzhou.img->screenshot-1
Tick "Customize configuration before install" and click "Finish".
In last page check disk information->screenshot-2.
Storage size: 0.19M
Storage format: raw

And after installation starting, it will also failed at disk partitioning page.

Actual results:
As above.

Expected results:
Show qcow2 disk size correctly.

Additional info:
After i create a new dir pool using path "/var/test1/", then do above step again, virt-manager will show disk size and format correctly.

Comment 1 zhoujunqin 2017-01-20 11:00:13 UTC
Created attachment 1242715 [details]

Comment 4 Cole Robinson 2017-03-02 19:39:31 UTC
Thanks for the report, but this is not something that we can realistically 'fix' in RHEL6. The way this works upstream is that we will automatically create a storage pool for the parent directory, so that we can leverage libvirt's storage knowledge to introspect the selected disk image. This work can not be backported and can not easily be worked around. So this is CANTFIX for RHEL6

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