[lxc-users] set "lxc.aa_allow_incomplete = 1" - where do I add it for lxd?

Tomasz Chmielewski mangoo at wpkg.org
Tue Oct 27 14:33:11 UTC 2015


Interesting - this doesn't really work and hangs lxd:

1) first try:

root at srv7 ~ # lxc config set testct raw.lxc 
"lxc.network.ipv4=10.0.3.228/24"
error: problem applying raw.lxc, perhaps there is a syntax error?
root at srv7 ~ #

2) second try - it never returns:

root at srv7 ~ # lxc config set testct raw.lxc 
"lxc.network.ipv4=10.0.3.228/24"
(hangs here, no prompt)


3) in a different shell - also hangs and never returns:

root at srv7 ~ # lxc list


4) this also hangs and never returns:

root at srv7 ~ # service lxd stop



In the log, I can see:

             lxc 1445956132.156 ERROR    lxc_confile - 
confile.c:network_netdev:544 - network is not created for 
'lxc.network.ipv4' = '10.0.3.228/.24' option
             lxc 1445956132.156 ERROR    lxc_parse - 
parse.c:lxc_file_for_each_line:57 - Failed to parse config: 
lxc.network.ipv4=10.0.3.228/.24


Tomasz




On 2015-10-27 10:02, Tomasz Chmielewski wrote:
> Thanks, it worked.
> 
> How do I set other "lxc-style" values in lxd, like for example:
> 
> lxc.network.ipv4 = 10.0.12.2/24
> lxc.network.ipv4.gateway = 10.0.12.1
> lxc.network.ipv6 = 1111:2222:3333:4444::55
> lxc.network.ipv6.gateway = 1111:2345:6789:aaaa::2
> 
> 
> Same "lxc config set containername", i.e.:
> 
> lxc config set x1 raw.lxc "lxc.network.ipv4 = 10.0.12.2/24"
> lxc config set x1 raw.lxc "lxc.network.ipv4.gateway = 10.0.12.1"
> lxc config set x1 raw.lxc "lxc.network.ipv6 = 1111:2222:3333:4444::55"
> lxc config set x1 raw.lxc "lxc.network.ipv6.gateway = 
> 1111:2345:6789:aaaa::2"
> 
> 
> Or is there some other, more recommended way?
> 
> Tomasz
> 
> 
> On 2015-10-27 02:35, Serge Hallyn wrote:
>> That's an ideal use for 'lxc.raw'.
>> 
>> lxc config set x1 raw.lxc "lxc.aa_allow_incomplete=1"
>> 
>> The lxc configuration for lxd containers is auto-generated on each 
>> container
>> start, as is the apparmor policy.  The contents of the 'lxc.raw' 
>> config
>> item are appended to the auto-generated config.
>> 
>> Quoting Tomasz Chmielewski (mangoo at wpkg.org):
>>> I get the following when starting a container with lxd:
>>> 
>>>      Incomplete AppArmor support in your kernel
>>>      If you really want to start this container, set
>>>      lxc.aa_allow_incomplete = 1
>>>      in your container configuration file
>>> 
>>> 
>>> Where exactly do I set this with lxd? I don't really see a "config"
>>> file, like with lxc. Is it "metadata.yaml"? If so - how to set it
>>> there?
>>> 
>>> 
>>> Tomasz Chmielewski
>>> http://wpkg.org
>>> 
>>> _______________________________________________
>>> lxc-users mailing list
>>> lxc-users at lists.linuxcontainers.org
>>> http://lists.linuxcontainers.org/listinfo/lxc-users
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list