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 995897

Summary: fail to start lxc domain with disabled selinux
Product: Red Hat Enterprise Linux 6 Reporter: fly-away <flyaaway>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4CC: acathrow, ajia, dallan, dyuan, ernest.beinrohr, lsu
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-13 13:43:11 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:

Description fly-away 2013-08-11 22:39:07 UTC
Description of problem:
Fail to start LXC guest with disabled selinux

Version-Release number of selected component (if applicable):
kernel 2.6.32-358.14.1.el6.x86_64
libvirt-0.10.2-18.el6_4.9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Set in /etc/sysconfig/selinux
    SELINUX=disabled
   reboot the system

2. Define a LXC guest
# cat toy.xml
<domain type='lxc'>
  <name>toy</name>
  <uuid>386f5b25-43ee-9d62-4ce2-62c3809e47c1</uuid>
  <memory>500000</memory>
  <currentMemory>500000</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/bin/sh</init>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/libvirt_lxc</emulator>
    <console type='pty'>
      <target port='0'/>
    </console>
  </devices>
</domain>

# virsh -c lxc:/// define toy.xml
Domain toy defined from toy.xml


2. Start the LXC guest
 # virsh -c lxc:/// start toy
error: Failed to start domain toy
error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=386f5b25-43ee-9d62-4ce2-62c3809e47c1 LIBVIRT_LXC_UUID=386f5b25-43ee-9d62-4ce2-62c3809e47c1 LIBVIRT_LXC_NAME=toy /bin/sh
2013-08-11 22:23:30.790+0000: 1: info : libvirt version: 0.10.2, package: 18.el6_4.9 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2012-09-13-00:00:13, x86-009.build.bos.redhat.com)
2013-08-11 22:23:30.790+0000: 1: error : lxcContainerMountBasicFS:561 : Failed to mount /selinux on /selinux type selinuxfs flags=e opts=(null): No such device
2013-08-11 22:23:30.790+0000: 26762: info : libvirt version: 0.10.2, package: 18.el6_4.9 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2012-09-13-00:00:13, x86-009.build.bos.redhat.com)
2013-08-11 22:23:30.790+0000: 26762: error : virLXCControllerRun:1408 : error receiving signal from container: Input/output error


Actual results:
Fail to start

Expected results:


Additional info:
Also try to set 
   security_driver = "none"
in /etc/libvirt/lxc.conf
without any success

Comment 4 Dave Allan 2013-08-13 13:43:11 UTC
One of my colleagues pointed out that this is a known bug.  It will be fixed shortly.

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

Comment 5 Dave Allan 2013-08-13 13:46:52 UTC
I apologize that 915485 is not public, but it's currently ON_QE.

Comment 6 ernest.beinrohr 2014-05-05 11:02:38 UTC
Just a note: switching from disabled to "permissive" allowed libvirt to start the lxc container.