Bug 1517308

Summary: Images virtual size is unnecessarily big
Product: Red Hat CloudForms Management Engine Reporter: Jaroslav Henner <jhenner>
Component: BuildAssignee: Satoe Imaishi <simaishi>
Status: CLOSED CURRENTRELEASE QA Contact: Jaroslav Henner <jhenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9.0CC: cpelland, dajohnso, hhudgeon, jhardy, jhenner, jprause, maufart, obarenbo, simaishi, slucidi
Target Milestone: GA   
Target Release: cfme-future   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-12 19:18:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:

Description Jaroslav Henner 2017-11-24 15:28:25 UTC
Description of problem:
The image virtual size is unnecessarily big, requiring big flavor to boot in openstack. Because the quemu image can be grown, but not shrink, it would be better to just use smaller virtual size and let the user grow the this if needed.

Version-Release number of selected component (if applicable):
cfme-rhos-5.9.0.9-1.x86_64.qcow2


How reproducible:
always


Steps to Reproduce:
qemu-img info /tmp/foo
image: /tmp/foo
file format: qcow2
virtual size: 40G (42949672960 bytes)
disk size: 1.1G


Actual results:


Expected results:
Disk size ~10 should be enough for everybody. If it is too small, it can be grown.

Additional info:

Comment 5 Dave Johnson 2017-12-07 15:09:11 UTC
Satoe, can you confirm how the image is packaged please?  It sounds like it is THIN if the image size is 1.1GB and the virtual size is 40GB, is that correct?  This smell like environmental issue.

Comment 11 Jaroslav Henner 2020-01-03 16:01:58 UTC
This bug is closed, but anyway:

virtual size is the disk size of the image which will be read by VM
disk size is the real size which hold in the host file system

I wanted to change the virtual size because at that time this value was what Heat was looking at. If someone wants to increase that value, it is not a problem (I think one can use qemu-img resize  for that.) I think there was though no way to make that value smaller. Today it seems to be possible but still it is more difficult to shrink than grow as data need to be reallocated from the tail of the "allocated" virtual space.