LXC + Selinux

Support for security such as Firewalls and securing linux
Posts: 33
Joined: 2010/04/09 15:38:07

LXC + Selinux

Postby bryn1u » 2018/02/01 19:07:23

Hey guys,
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:
line like belowe:
lxc.selinux.context = system_u:system_r:lxc_t:s0:c22

Code: Select all

When i want to run it, im getting error:

    [root@Centos test]# lxc-start -n test
    lxc-start: confile.c: parse_line: 1750 unknown key lxc.selinux.context
    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

    lxc-start: lxc_start.c: main: 268 Failed to create lxc_container

Someone can help me ? What am i doing wrong ? I just take it from documentation and it doesn't work :((