[lxc-users] Enabling Selinux for containers.

bryn1u85 . m.bryn1u at gmail.com
Wed Jan 31 11:16:45 UTC 2018


First of all i would like to say hello everyone.

Im trying to create my cointainer based on Centos 7 and Selinux enabled.
I have added this entry:
lxc.se.context = unconfined_u:unconfined_r:lxc_t:s0-s0:c0.c1023

I added to the default config which is:
/usr/share/lxc/config/centos.common.conf

After lxc-start -n Test im still getting error like below:
[root at hardenedbsd Test]# lxc-start -n Test
lxc-start: confile.c: parse_line: 1750 unknown key lxc.se.context
lxc-start: parse.c: lxc_file_for_each_line: 57 Failed to parse config:
lxc.se.context = unconfined_u:unconfined_r:lxc_t:s0-s0:c0.c1023

lxc-start: parse.c: lxc_file_for_each_line: 57 Failed to parse config:
lxc.include = /usr/share/lxc/config/centos.common.conf

lxc-start: lxc_start.c: main: 268 Failed to create lxc_container
[root at hardenedbsd Test]#

I was trying other way like sVirt with Selinux:
virt-install --connect lxc://  ...
After install:
virt -c lxc://console Test

In this way, selinux works but i want to use by lxc configuration. Can i
achieve in this way ?
I would be really graceful for help.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20180131/173851e7/attachment.html>


More information about the lxc-users mailing list