Bug 689346

Summary: Guest installation fails with pre-created qcow2 img as storage in virt-manager
Product: Red Hat Enterprise Linux 5 Reporter: Min Zhan <mzhan>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: dyuan, jyang, llim, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-12 23:07:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Min Zhan 2011-03-21 07:10:35 UTC
Description of problem:
First use qemu-img create a qcow2 img file, size as 4G. then use virt-manager to install a guest, select this qcow2 img as storage, found that disk size=0, which makes installation fail.

Version-Release number of selected component (if applicable):
# uname -a
Linux localhost.localdomain 2.6.18-237.el5 #1 SMP Mon Dec 13 18:07:57 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
kvm-83-224.el5
libvirt-0.8.2-15.el5

How reproducible:
Always

Steps to Reproduce:
1. Prepare a qcow2 img file
# qemu-img create -f qcow2 qcow2-test 4G
Formatting 'qcow2-test', fmt=qcow2, size=4194304 kB

# qemu-img info qcow2-test 
image: qcow2-test
file format: qcow2
virtual size: 4.0G (4294967296 bytes)
disk size: 144K
cluster_size: 65536
  
2. Use virt-manager to install a new guest, select qcow2-test as disk img storage. prepare to install, then found 0MB disk size for this img, and make installation fail.

3. # ll -lhs /var/lib/libvirt/images
144K -rw-r--r-- 1 root root 256K Mar 21 21:52 qcow2-test

Actual results:
Installation fails because disk img file size is 0.

Expected results:
Disk size should be 4GB

Additional info:

I can reproduce this bug with RHEL5.6.z, libvirt-0.8.2-15.el5_6.3.

And it works well in RHEL6.1,libvirt-0.8.7-13.el6.

Comment 1 RHEL Program Management 2011-06-20 22:36:40 UTC
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.7 and Red Hat does not plan to fix this issue the currently developed update.

Contact your manager or support representative in case you need to escalate this bug.

Comment 3 Cole Robinson 2011-07-12 23:07:47 UTC
This should be fixed in 5.7. Duping to the bug that should have patched this to work

*** This bug has been marked as a duplicate of bug 644271 ***