Bug 681779

Summary: qcow2 image become raw format after start this image with format=raw
Product: Red Hat Enterprise Linux 6 Reporter: Shirley Zhou <szhou>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.3CC: mkenneth, mshao, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-03 11:28:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 580953    

Description Shirley Zhou 2011-03-03 08:37:49 UTC
Description of problem:
Create qcow2 image, and then start this image with raw format as data disk of windows guest, then check this qcow2 image, find it become raw format using qemu-img info.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.147.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.create qcow2 image
# qemu-img create -f qcow2 data.img 2G
# qemu-img info data.img 
image: data.img
file format: qcow2
virtual size: 2.0G (2147483648 bytes)
disk size: 136K
cluster_size: 65536
2. start windows guest with this qcow2 image with format=raw, 
-drive file=/home/data.img,if=none,id=drive-ide0-0-1,format=raw,cache=none -device virtio-blk-pci,drive=drive-ide0-0-1,id=ide0-0-1
3.login windows guest, and go to Disk Management, click on OK on pop up initialize disk windows.
4. check this image info again
# qemu-img info data.img 
image: data.img
file format: raw
virtual size: 256K (262144 bytes)
disk size: 136K

Actual results:
After start this qcow2 image in windows guest with format=raw, it become raw format.

Expected results:
It should keep qcow2 format.

Additional info:

Try this issue on RHEL guest, qcow2 format has no change.

Comment 2 Dor Laor 2011-03-03 11:28:26 UTC
That's works as designed. Otherwise it is a security hole.