Bug 915162

Summary: AHCI disk drive (not CD-ROM) doesn't support the readonly=on
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, chayang, flang, juzhang, kwolf, michen, pbonzini, qzhang, sluo, 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: 2013-02-25 08:10:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sibiao Luo 2013-02-25 06:03:44 UTC
Description of problem:
boot a guest with a AHCI disk drive (not CD-ROM) adding readonly=on, but the qemu will fail to boot up. while the AHCI(SATA) CD-ROM can support the readonly=on.

Version-Release number of selected component (if applicable):
host info:
kernel-3.7.0-0.34.el7.x86_64
qemu-kvm-1.3.0-5.el7.x86_6
guest info:
kernel-3.7.0-0.34.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot a guest with a AHCI disk drive (not CD-ROM) adding readonly=on.
e.g:...-device ahci,id=ahci1,bus=pci.0,multifunction=on,addr=0x8 -drive file=/home/my-data-disk.raw,if=none,media=disk,format=raw,id=drive-sata-disk,readonly=on -device ide-hd/ide-drive,drive=drive-sata-disk,id=sata-disk,bus=ahci1.0,unit=0
2.
3.
  
Actual results:
after the step 1,
guest fail to boot up with qemu prompt like: 
qemu-kvm: -device ide-hd,drive=drive-sata-disk,id=sata-disk,bus=ahci1.0,unit=0: Can't use a read-only drive
qemu-kvm: -device ide-hd,drive=drive-sata-disk,id=sata-disk,bus=ahci1.0,unit=0: Device 'ide-hd' could not be initialized

Expected results:

Additional info:

Comment 1 Paolo Bonzini 2013-02-25 08:10:22 UTC
The ATA standard does not support read-only hard disks.