Bug 672734 - VM whose image is not stored in /var/lib/libvirt/images can be run successfully with SElinux enabled
Summary: VM whose image is not stored in /var/lib/libvirt/images can be run successful...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 672733
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-26 05:24 UTC by Mark Wu
Modified: 2011-04-06 02:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 672733
Environment:
Last Closed: 2011-04-06 02:15:39 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Mark Wu 2011-01-26 05:24:19 UTC
+++ This bug was initially created as a clone of Bug #672733 +++

Description of problem:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/sect-Virtualization-Security_for_virtualization-SELinux_and_virtualization.html

In section 16.2 SElinux and virtulization, it's said that:

SELinux prevents guest images from loading if SELinux is enabled and the images are not in the correct directory. SELinux requires that all guest images are stored in /var/lib/libvirt/images.  

Actually, by default the guest can be run wherever its image is stored because libvirtd will change the security context of the guest image into an appropriate one before it was launched. It's a feature of svirt which is integrated in libvirtd. 

If you disable svirt via changing security_driver to "none" in /etc/libvirt/qemu.conf, it will fail to run any VMs in incorrect directories. 

Actually, I am not sure it's a document problem or libvirt's problem: it shouldn't change the security attribute of the images not in storage pool.

Version-Release number of selected component (if applicable):
6.0

How reproducible:
100%

Steps to Reproduce:
1. create a new virtual machine
2. move the image to /local/images, and change the configuration of that guest to point to the new location
3. start the guest again
  
Actual results:

Expected results:



Additional info:

Comment 1 RHEL Program Management 2011-04-04 02:07:42 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.


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