Bug 644763 - Can't start guest with <readonly/> label in floopy xml block and SELinux enabled
Summary: Can't start guest with <readonly/> label in floopy xml block and SELinux enabled
Keywords:
Status: CLOSED DUPLICATE of bug 510612
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-20 08:24 UTC by xhu
Modified: 2010-10-22 11:44 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-22 11:28:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description xhu 2010-10-20 08:24:24 UTC
Description of problem:
Can't start guest with <readonly/> label in floopy block xml and SELinux enabled

Version-Release number of selected component (if applicable):
kernel-2.6.18-227.el5
libvirt-0.8.2-7.el5

How reproducible:
everytime

Steps to Reproduce:
1. Enable SELinux:
# setenforce 1

2.Prepare a guest vm with following guest xml:
<domain type='qemu'>
  <name>vm</name>
  <uuid>b2ffa0f7-e2ba-1cc1-27c0-c9e50ab16b27</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/rh5.6.img'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <disk type='file' device='floppy'>
      <driver name='qemu' type='raw'/>
      <source file='/tmp/floppy.img'/>
      <target dev='fda' bus='fdc'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <controller type='ide' index='0'/>
    <controller type='fdc' index='0'/>
    <interface type='network'>
      <mac address='54:52:00:12:18:67'/>
      <source network='default'/>
      <target dev='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
    </video>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <address bus='1' device='2'/>
      </source>
    </hostdev>
  </devices>
</domain>

3. start the guest
# virsh start vm
  
Actual results:
# virsh start vm
error: Failed to start domain vm
error: internal error Process exited while reading console log output: qemu: could not open disk image /tmp/floppy.img
The above error occurs after step 3

Expected results:
The guest should be started successfully

Additional info:
If SELinux is disabled, the guest can be started successfully.

Comment 1 Jiri Denemark 2010-10-22 11:28:12 UTC

*** This bug has been marked as a duplicate of bug 641854 ***

Comment 2 Jiri Denemark 2010-10-22 11:44:32 UTC
I pasted wrong bug number in the "duplicate of" field. Bug 510612 is the correct one.

*** This bug has been marked as a duplicate of bug 510612 ***


Note You need to log in before you can comment on or make changes to this bug.