Bug 601494

Summary: qemu-io: No permission to write image
Product: Red Hat Enterprise Linux 5 Reporter: Amos Kong <akong>
Component: kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: ailan, ajia, kwolf, lihuang, mjenner, mkenneth, qzhang, virt-maint, ykaul
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kvm-83-183.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 23:35:56 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 Amos Kong 2010-06-08 05:27:03 UTC
Description of problem:

I created a image and write it by qemu-io, touched a error msg "write failed: Permission denied".

# qemu-img create -f qcow2 test.qcow2 10G
Formatting 'test.qcow2', fmt=qcow2, size=10485760 kB
# ls -l test.qcow2 
-rw-r--r-- 1 root root 262144 Jun  8 12:49 test.qcow2
# qemu-io test.qcow2
qemu-io> write 0 2M -P 65
write failed: Permission denied
qemu-io>

Version-Release number of selected component (if applicable):
host kernel: 2.6.18-200.el5
# rpm -qa |grep kvm
etherboot-zroms-kvm-5.4.4-12.el5
kvm-83-181.el5
etherboot-zroms-kvm-5.4.4-10.el5
etherboot-zroms-kvm-5.4.4-13.el5
kvm-debuginfo-83-181.el5
kmod-kvm-83-181.el5
kvm-tools-83-181.el5
kvm-qemu-img-83-181.el5
# rpm -qf /usr/bin/qemu-io
kvm-tools-83-181.el5

How reproducible:
100%

Steps to Reproduce:
1.create a image
# qemu-img create -f qcow2 test.qcow2 10G
2.write it by qemu-io
# qemu-io test.qcow2
qemu-io> write 0 2M -P 65

Comment 1 Kevin Wolf 2010-06-11 10:48:54 UTC
Bisected to 69f1606d ("read-only: BDRV_O_FLAGS changes, default now is read-only").

Comment 7 Amos Kong 2010-09-17 04:54:59 UTC
Could not reproduce this bug with kvm-83-193.el5
Moving to VERIFIED

Comment 9 errata-xmlrpc 2011-01-13 23:35:56 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0028.html