Bug 1095135

Summary: can't use iso images on readonly nfs filesystem
Product: Red Hat Enterprise Linux 6 Reporter: EricLee <bili>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6CC: cwei, didi, dyuan, eblake, kraxel, mzhan, rbalakri, riehecky, shyu, weizhan
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.10.2-36.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 996543 Environment:
Last Closed: 2014-10-14 04:21:45 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:
Bug Depends On: 996543    
Bug Blocks:    

Comment 2 Michal Privoznik 2014-05-07 11:22:55 UTC
Moving to POST:

http://post-office.corp.redhat.com/archives/rhvirt-patches/2014-May/msg00155.html

Comment 4 chhu 2014-05-27 05:06:46 UTC
Reproduced with libvirt-0.10.2-33.el6.x86_64,

Verified with packages:
libvirt-0.10.2-37.el6.x86_64
libvirt-client-0.10.2-37.el6.x86_64

Test steps:
1. prepare the iso image which is located on a read-only nfs export.
mount -o ro 10.66.90.121:/vol/S3/libvirtmanual /mnt/tmp/

2. check the environment.
# getsebool virt_use_nfs
virt_use_nfs --> on
# getenforce
Enforcing

3. define, start a domain with an iso on readonly filesystem as cdrom.
# virsh dumpxml r6| grep disk -C 5
  <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='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/r6.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source file='/mnt/nfs/rhel7.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
# virsh start r6
Domain r6 started

4. login to the guest, mount the iso, can read and can not write.

Test results:
current command work well.

Comment 7 errata-xmlrpc 2014-10-14 04:21:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1374.html