Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 672734

Summary: VM whose image is not stored in /var/lib/libvirt/images can be run successfully with SElinux enabled
Product: Red Hat Enterprise Linux 6 Reporter: Mark Wu <dwu>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0CC: eblake, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 672733 Environment:
Last Closed: 2011-04-06 02:15:39 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: 672733    
Bug Blocks:    

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.