Bug 536760
Summary: | libvirt should pass readonly=on to qemu | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Serge Pavlovsky <pal666> | |
Component: | libvirt | Assignee: | Daniel Berrangé <berrange> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 14 | CC: | adagostino66, berrange, bobgus, clalance, crobinso, dave, dwalsh, hacataka, ingimar, itamar, jeremy.butler36, jforbes, karmstrong, markmc, mgrepl, mjs, pandaparag, paulmarc.bougharios, satimis, swuste, tarek.ahmed.omar, veillard, virt-maint, walkerrichardj | |
Target Milestone: | --- | Keywords: | Triaged | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | setroubleshoot_trace_hash:6e45b905c83145aab17ee23fcd5b81e4c5d803fa44e195edba55c2a4a7d00624 | |||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 556769 (view as bug list) | Environment: | ||
Last Closed: | 2010-11-17 19:27:55 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: | 537163 | |||
Bug Blocks: | 498969 |
Description
Serge Pavlovsky
2009-11-11 09:11:52 UTC
If this device was a read/writable device it should have been given a different label Please provide the libvirt XML configuration for this guest and the log file. As root run virsh dumpxml GUESTNAME and save /var/log/libvirt/qemu/$GUESTNAME.log drive is r/w, but media was r/o <domain type='kvm'> <name>xp</name> <uuid>e917f9ea-b05f-ad51-4cbd-9b447e5fc3c5</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-0.11'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/xp.img'/> <target dev='hda' bus='ide'/> </disk> <disk type='block' device='cdrom'> <driver name='qemu'/> <source dev='/dev/sr0'/> <target dev='hdc' bus='ide'/> <readonly/> </disk> <interface type='network'> <mac address='52:54:00:46:53:a5'/> <source network='default'/> </interface> <serial type='pty'> <source path='/dev/pts/4'/> <target port='0'/> </serial> <console type='pty' tty='/dev/pts/4'> <source path='/dev/pts/4'/> <target port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> <sound model='es1370'/> <video> <model type='cirrus' vram='9216' heads='1'/> </video> </devices> </domain> LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.11 -m 512 -smp 1 -name xp -uuid e917f9ea-b05f-ad51-4cbd-9b447e5fc3c5 -monitor unix:/var/lib/libvirt/qemu/xp.monitor,server,nowait -localtime -no-reboot -boot d -drive file=/var/lib/libvirt/images/xp.img,if=ide,index=0,format=raw -drive file=/dev/sr0,if=ide,media=cdrom,index=2 -net nic,macaddr=52:54:00:46:53:a5,vlan=0,name=nic.0 -net tap,fd=18,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -vga cirrus -soundhw es1370 char device redirected to /dev/pts/4 LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.11 -m 512 -smp 1 -name xp -uuid e917f9ea-b05f-ad51-4cbd-9b447e5fc3c5 -monitor unix:/var/lib/libvirt/qemu/xp.monitor,server,nowait -localtime -boot c -drive file=/var/lib/libvirt/images/xp.img,if=ide,index=0,boot=on,format=raw -drive file=,if=ide,media=cdrom,index=2 -net nic,macaddr=52:54:00:46:53:a5,vlan=0,name=nic.0 -net tap,fd=18,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -vga cirrus -soundhw es1370 char device redirected to /dev/pts/4 The root cause of this problem is a limitation of QEMU - we want CDROM devices to be readonly, and libvirt has them marked as such, but QEMU still tries to open them read-write. I opened bug 537163 to get this fixed in QEMU There doesn't seem to be much special about this scenrio. Any idea why we aren't we seeing more of these AVCs? I got the same message. I thought I was trying to write to my regular hard disk - not the CDROM. Somehow, on the 2nd try, the write to the hard disk succeeded - and I now have a running virtual machine with a disk footprint at: [root@hoho6 images]# pwd /var/lib/libvirt/images [root@hoho6 images]# ls -l total 1228804 -rw-------. 1 qemu qemu 20971520000 2009-11-20 23:03 t280rc-min-486.img [root@hoho6 images]# I did not change the security setting. SELinux Administrations says: Enforcing Enforcing targeted curious *** Bug 540174 has been marked as a duplicate of this bug. *** THis is actively in progress upstream http://lists.gnu.org/archive/html/qemu-devel/2010-01/msg01124.html *** Bug 557767 has been marked as a duplicate of this bug. *** *** Bug 558047 has been marked as a duplicate of this bug. *** *** Bug 558219 has been marked as a duplicate of this bug. *** *** Bug 558300 has been marked as a duplicate of this bug. *** *** Bug 560849 has been marked as a duplicate of this bug. *** *** Bug 561764 has been marked as a duplicate of this bug. *** *** Bug 561376 has been marked as a duplicate of this bug. *** *** Bug 569266 has been marked as a duplicate of this bug. *** Tentative patch to fix this posted upstream, https://www.redhat.com/archives/libvir-list/2010-March/msg00503.html Daniel Since this required features that currently aren't even in a released qemu, it's unlikely this issue will be fixed in F12 or F13. Moving to rawhide. We need a work around for this in RHEL6? This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle. Changing version to '14'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping AFAICT this is fixed in F14. Closing |