Bug 655735
Summary: | qemu-kvm (or libvirt?) permission denied errors when exporting readonly IDE disk to guest | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Richard W.M. Jones <rjones> |
Component: | qemu-kvm | Assignee: | Markus Armbruster <armbru> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 6.0 | CC: | llim, michen, mkenneth, szhou, tburke, virt-maint |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | 6.1 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-0.12.1.2-2.148.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-05-19 11:31: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: | 580953 |
Description
Richard W.M. Jones
2010-11-22 10:49:04 UTC
IDE disks can't do readonly. QEMU rejects readonly=on with if=ide, but fails to do so with if=none. Fixed upstream in commit 7aa9c811. Would backporting that commit fix this bug? I figure only if libvirt handles the error sanely. Let's find out. Dan Berrange says libvirt handles this kind of error. Related: invalid CHS. Best fixed together. Reproducer: $ qemu-kvm -nodefaults -vnc :0 -enable-kvm -S -monitor stdio -drive id=drv,file=tmp.qcow2,if=none,cyls=256,heads=17,secs=63 -device ide-drive,drive=drv Expected: qemu-system-x86_64: -device ide-drive,drive=drv: heads must be between 1 and 16 qemu-system-x86_64: -device ide-drive,drive=drv: Device 'ide-drive' could not be initialized Actual: No error. I didn't check how the invalid geometry is exposed to the guest, nor how guests commonly react to it. Don't expect it to be pretty. Similarly simplified reproducer for readonly: $ qemu-kvm -nodefaults -vnc :0 -enable-kvm -S -monitor stdio -drive id=drv,file=tmp.qcow2,readonly,if=none -device ide-drive,drive=drv Expected: qemu-system-x86_64: -device ide-drive,drive=drv: Can't use a read-only drive qemu-system-x86_64: -device ide-drive,drive=drv: Device 'ide-drive' could not be initialized Actual: No error. Guest sees IDE disk (which can't be readonly), attempts to write, gets nasty IDE errors. Reproduce this bug with qemu-kvm-0.12.1.2-2.133.el6.x86_64 as following steps: 1. Start guest with attached ide data disk with readonly=on -drive file=/root/data.img,if=none,id=driveide0-0-1,format=qcow2,cache=none,readonly=on -device ide-drive,drive=drive-ide0-0-1,id=ide0-0-1 2. login guest, try to make partition on above ide disk, some block io error occurs in qemu monitor, and error happens in guest (qemu) block I/O error in device 'drive-ide0-0-1': Operation not permitted (1) block I/O error in device 'drive-ide0-0-1': Operation not permitted (1) sd 1:0:0:0: [sda] Add. Sense: No additional sense information sd 1:0:0:0: [sda] CDB: Write(10): 2a 00 00 00 00 00 00 00 08 00 end_request: I/O error, dev sda, sector 0 Buffer I/O error on device sda, logical block 0 lost page write due to I/O error on sda ata2: EH complete sda: unknown partition table Verify this bug with qemu-kvm-0.12.1.2-2.148.el6.x86_64, guest can not be start when start guest with attached ide data disk with readonly=on qemu-kvm: -device ide-drive,drive=drive-ide0-0-1,id=ide0-0-1: Can't use a read-only drive qemu-kvm: -device ide-drive,drive=drive-ide0-0-1,id=ide0-0-1: Device 'ide-drive' could not be initialized So this bug has been resolved. move to verified based on comment#9 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-0534.html 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-0534.html |