Bug 566420

Summary: QEMU can create disk with size zero but can not run it. Creation of zero size disk should be forbidden.
Product: Red Hat Enterprise Linux 5 Reporter: Leonid Natapov <lnatapov>
Component: kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.5CC: apevec, ovirt-maint, virt-maint, yeylon, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-14 16:40:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580948    

Description Leonid Natapov 2010-02-18 12:54:03 UTC
QEMU can create disk with size zero but can not format it or run it. Creation of zero size disk should be forbidden.

[root@dhcp-1-143 ~]# qemu-img create -f qcow2 test 0 Formatting 'test', fmt=qcow2, size=0 kB
[root@dhcp-1-143 ~]# qemu-img convert -f qcow2 test test2
qemu-img: Could not open 'test'

Comment 2 Alan Pevec 2010-02-18 13:23:45 UTC
please provide kvm version

Comment 3 Leonid Natapov 2010-02-18 13:30:36 UTC
[root@magenta-vdsa ~]# rpm -qa | grep qemu
kvm-qemu-img-83-155.el5
vdsm-faqemu-4.5-27
gpxe-roms-qemu-0.9.7-8.el5
[root@magenta-vdsa ~]# rpm -qa | grep kvm
kvm-qemu-img-83-155.el5
kvm-83-155.el5
etherboot-zroms-kvm-5.4.4-13.el5
kmod-kvm-83-155.el5
kvm-tools-83-155.el5

Comment 4 Kevin Wolf 2010-07-01 10:19:35 UTC
If anything, we should allow opening zero-sized images as in RHEL6. Patch would be trivial (removing check for header.size <= 1).

Comment 7 RHEL Program Management 2011-01-11 20:28:04 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 8 RHEL Program Management 2011-01-11 22:49:47 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.