<div dir="ltr"><div>Hi,</div><div><br></div><div>I just created a container with:</div><div><br></div><div>lxc-create -n test1 -t ubuntu<br></div><div><br></div><div><div>Checking cache download in /var/cache/lxc/trusty/rootfs-amd64 ... </div>
<div>Copy /var/cache/lxc/trusty/rootfs-amd64 to /var/lib/lxc/test1/rootfs ... </div><div>Copying rootfs to /var/lib/lxc/test1/rootfs ...</div><div>Generating locales...</div><div>  en_US.UTF-8... up-to-date</div><div>Generation complete.</div>
<div>Creating SSH2 RSA key; this may take some time ...</div><div>Creating SSH2 DSA key; this may take some time ...</div><div>Creating SSH2 ECDSA key; this may take some time ...</div><div>invoke-rc.d: policy-rc.d denied execution of start.</div>
<div><br></div><div>Current default time zone: 'Europe/Zurich'</div><div>Local time is now:      Tue Feb  4 21:28:10 CET 2014.</div><div>Universal Time is now:  Tue Feb  4 20:28:10 UTC 2014.</div><div><br></div><div>
<br></div><div>##</div><div># The default user is 'ubuntu' with password 'ubuntu'!</div><div># Use the 'sudo' command to run tasks as root in the container.</div><div>##</div></div><div><br></div><div>
added some restrictions to the config</div><div><br></div><div>cat <<EOF >> /var/lib/lxc/test1/config</div><div><div>lxc.cgroup.cpu.shares = 256</div><div># restrict IO weight to 1/2 (range 10-1000)</div><div>
lxc.cgroup.blkio.weight = 500 </div><div># limit memory</div><div>lxc.cgroup.memory.limit_in_bytes = 4G</div><div>lxc.cgroup.memory.soft_limit_in_bytes = 3G</div><div># memory + swap limit (6G - 4G = 2G SWAP)</div><div>lxc.cgroup.memory.memsw.limit_in_bytes = 6G</div>
<div># default 60</div><div>lxc.cgroup.memory.swappiness = 10</div><div># untestet</div><div>lxc.cgroup.memory.oom_control = 0</div></div><div>EOF</div><div><br></div><div>and tried to start the container with:</div><div>
<br></div><div>lxc-start -d -n test1 -l debug -o /tmp/222<br></div><div><br></div><div>cat /tmp/222</div><div>      lxc-start 1391545773.545 INFO     lxc_start_ui - using rcfile /var/lib/lxc/test1/config<br></div><div>      lxc-start 1391545773.546 WARN     lxc_log - lxc_log_init called with log already initialized</div>
<div>      lxc-start 1391545773.551 INFO     lxc_lsm - LSM security driver AppArmor</div><div>      lxc-start 1391545773.552 DEBUG    lxc_conf - allocated pty '/dev/pts/17' (5/6)</div><div>      lxc-start 1391545773.552 DEBUG    lxc_conf - allocated pty '/dev/pts/18' (7/8)</div>
<div>      lxc-start 1391545773.552 DEBUG    lxc_conf - allocated pty '/dev/pts/19' (9/10)</div><div>      lxc-start 1391545773.552 DEBUG    lxc_conf - allocated pty '/dev/pts/20' (11/12)</div><div>      lxc-start 1391545773.552 INFO     lxc_conf - tty's configured</div>
<div>      lxc-start 1391545773.552 DEBUG    lxc_start - sigchild handler set</div><div>      lxc-start 1391545773.552 DEBUG    lxc_console - no console peer</div><div>      lxc-start 1391545773.552 INFO     lxc_start - 'test1' is initialized</div>
<div>      lxc-start 1391545773.554 INFO     lxc_monitor - using monitor sock name lxc/ad055575fe28ddd5//var/lib/lxc</div><div>      lxc-start 1391545773.559 DEBUG    lxc_start - Not dropping cap_sys_boot or watching utmp</div>
<div><br></div><div>      lxc-start 1391545773.568 ERROR    lxc_conf - failed to attach 'vethUNUBR9' to the bridge 'lxcbr0' : No such device</div><div>      lxc-start 1391545773.591 ERROR    lxc_conf - failed to create netdev</div>
<div>      lxc-start 1391545773.591 ERROR    lxc_start - failed to create the network</div><div>      lxc-start 1391545773.591 ERROR    lxc_start - failed to spawn 'test1'</div><div>      lxc-start 1391545773.591 ERROR    lxc_commands - command get_cgroup failed to receive response</div>
<div>      lxc-start 1391545821.393 INFO     lxc_start_ui - using rcfile /var/lib/lxc/test1/config</div><div>      lxc-start 1391545821.394 WARN     lxc_log - lxc_log_init called with log already initialized</div><div>      lxc-start 1391545821.399 INFO     lxc_lsm - LSM security driver AppArmor</div>
<div>      lxc-start 1391545821.400 DEBUG    lxc_conf - allocated pty '/dev/pts/17' (5/6)</div><div>      lxc-start 1391545821.400 DEBUG    lxc_conf - allocated pty '/dev/pts/18' (7/8)</div><div>      lxc-start 1391545821.400 DEBUG    lxc_conf - allocated pty '/dev/pts/19' (9/10)</div>
<div>      lxc-start 1391545821.400 DEBUG    lxc_conf - allocated pty '/dev/pts/20' (11/12)</div><div>      lxc-start 1391545821.400 INFO     lxc_conf - tty's configured</div><div>      lxc-start 1391545821.400 DEBUG    lxc_start - sigchild handler set</div>
<div>      lxc-start 1391545821.400 DEBUG    lxc_console - no console peer</div><div>      lxc-start 1391545821.400 INFO     lxc_start - 'test1' is initialized</div><div>      lxc-start 1391545821.403 INFO     lxc_monitor - using monitor sock name lxc/ad055575fe28ddd5//var/lib/lxc</div>
<div>      lxc-start 1391545821.419 DEBUG    lxc_start - Not dropping cap_sys_boot or watching utmp</div><div><br></div><div>      lxc-start 1391545821.424 DEBUG    lxc_conf - instanciated veth 'vethCXBLUH/vethRFOV22', index is '72'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.deny' set to 'a'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c *:* m'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'b *:* m'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 1:3 rwm'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 1:5 rwm'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 5:0 rwm'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 5:1 rwm'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 1:8 rwm'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 1:9 rwm'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 5:2 rwm'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 136:* rwm'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 254:0 rm'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 10:229 rwm'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 10:200 rwm'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 1:7 rwm'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 10:228 rwm'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'devices.allow' set to 'c 10:232 rwm'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'cpu.shares' set to '256'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'blkio.weight' set to '500'</div><div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'memory.limit_in_bytes' set to '4G'</div>
<div>      lxc-start 1391545821.428 DEBUG    lxc_cgroup - cgroup 'memory.soft_limit_in_bytes' set to '3G'</div><div>      lxc-start 1391545821.428 ERROR    lxc_cgroup - Error setting memory.memsw.limit_in_bytes to 6G for test1</div>
<div><br></div><div>      lxc-start 1391545821.428 ERROR    lxc_start - failed to setup the cgroup limits for 'test1'</div><div>      lxc-start 1391545821.523 ERROR    lxc_start - failed to spawn 'test1'</div>
<div>      lxc-start 1391545821.523 ERROR    lxc_commands - command get_cgroup failed to receive response</div><div><br></div><div><br></div><div>Is cgroup memory.memsw.limit_in_bytes broken in ubuntu 14.04 right now?</div>
<div><br></div><div>Regards,</div><div>Flo</div></div>