<div dir="ltr">
<div class="gmail-comment-body"><p>Hey,<br>
Im trying to run lxc with selinux on Centos 7. I installed and created
lxc container with simple command lxc-create -n test -t centos. After
that i just added to the:<br>
/var/lib/lxc/test/config<br>
line like below:<br>
lxc.selinux.context = system_u:system_r:lxc_t:s0:c22<br>
or entry from <a href="https://stgraber.org/2014/01/01/lxc-1-0-security-features/">https://stgraber.org/2014/01/01/lxc-1-0-security-features/</a> :<br>
lxc.se_context = unconfined_u:unconfined_r:lxc_t:s0-s0:c0.c1023<br>
</p><p>Doesn’t matter which, issue is the same.<br>
When i want to run it, im getting error:</p>
<p> [root@Centos test]# lxc-start -n test<br>
lxc-start: confile.c: parse_line: 1750 unknown key lxc.selinux.context<br>
lxc-start: parse.c: lxc_file_for_each_line: 57 Failed to parse config: lxc.selinux.context = system_u:system_r:lxc_t:s0:c22</p>
<p> lxc-start: lxc_start.c: main: 268 Failed to create lxc_container</p>
<p>I have sent mail to the mailing list, written on github, forums,
asked on freenode but i haven’t got any answer. There isn’t any good
article or manual to help me fix it. Someone can help me resolve this
problem ? Or know some other way implement selinux for lxc ?<br></p>
</div>
<br></div>