meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ubiquiti:controller:lxc [2021/03/20 21:40] – created niziak | ubiquiti:controller:lxc [2021/03/20 22:37] (current) – niziak | ||
|---|---|---|---|
| Line 103: | Line 103: | ||
| === Issues === | === Issues === | ||
| + | |||
| + | === lxc-start: unifi: lxccontainer.c: | ||
| + | |||
| + | <code bash> | ||
| + | lxc-start -n unifi -l DEBUG -o debug.log | ||
| + | cat debug.log | ||
| + | |||
| + | lxc-start unifi 20210320203918.294 DEBUG conf - conf.c: | ||
| + | lxc-start unifi 20210320203918.310 INFO start - start.c: | ||
| + | lxc-start unifi 20210320203918.310 ERROR cgfsng - cgroups/ | ||
| + | lxc-start unifi 20210320203918.310 ERROR cgfsng - cgroups/ | ||
| + | lxc-start unifi 20210320203918.310 ERROR cgfsng - cgroups/ | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | $ lxc-checkconfig | ||
| + | ... | ||
| + | Cgroup v1 systemd controller: missing | ||
| + | Cgroup v1 freezer controller: missing | ||
| + | Cgroup namespace: required | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Solution for unprivileged containers: | ||
| + | <code bash> | ||
| + | systemd-run --user --scope -p " | ||
| + | </ | ||
| + | |||
| + | |||
| + | Reason: [[https:// | ||
| + | Problem solved in LXC v4.0.2-1~1. | ||
| + | Solution: <code bash> | ||
| + | |||
| + | |||
| + | |||
| + | Workaround 1: Add to container config: | ||
| + | < | ||
| + | lxc.cgroup.devices.allow = | ||
| + | lxc.cgroup.devices.deny = | ||
| + | # for unpriv container: | ||
| + | # | ||
| + | lxc.init.cmd = /sbin/init systemd.unified_cgroup_hierarchy=1 | ||
| + | </ | ||
| + | |||
| + | lxc.init.cmd = /sbin/init systemd.unified_cgroup_hierarchy | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | Workaround 2: | ||
| + | CGroupsV2 is the new default. | ||
| + | Set kernel commandline option: systemd.unified_cgroup_hierarchy=0 to retain the old default and lxc-start start container. | ||
| + | |||
| + | Workaround 3: | ||
| + | <code bash> | ||
| + | mount -o remount,rw / | ||
| + | mkdir / | ||
| + | mount -t cgroup devices -o devices / | ||
| + | mount -o remount,ro / | ||
| + | </ | ||
| + | |||
| === lxc-start: unifi: tools/ | === lxc-start: unifi: tools/ | ||