meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
ubiquiti:controller:lxc [2021/03/20 22:13] niziakubiquiti:controller:lxc [2021/03/20 22:37] (current) niziak
Line 125: Line 125:
 ... ...
 </code> </code>
 +
 +Solution for unprivileged containers: 
 +<code bash>
 +systemd-run --user --scope -p "Delegate=yes" lxc-start
 +</code>
 +
  
 Reason: [[https://wiki.debian.org/LXC/CGroupV2]] Reason: [[https://wiki.debian.org/LXC/CGroupV2]]
 Problem solved in LXC  v4.0.2-1~1.  Problem solved in LXC  v4.0.2-1~1. 
- 
 Solution: <code bash>apt-get install lxc -t bullseye</code> Solution: <code bash>apt-get install lxc -t bullseye</code>
 +
 +
  
 Workaround 1: Add to container config: Workaround 1: Add to container config:
Line 141: Line 148:
  
 lxc.init.cmd = /sbin/init systemd.unified_cgroup_hierarchy lxc.init.cmd = /sbin/init systemd.unified_cgroup_hierarchy
 +
  
  
Line 148: Line 156:
 Set kernel commandline option: systemd.unified_cgroup_hierarchy=0 to retain the old default and lxc-start start container. 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 /sys/fs/cgroup
 +mkdir /sys/fs/cgroup/devices
 +mount -t cgroup devices -o devices /sys/fs/cgroup/devices
 +mount -o remount,ro /sys/fs/cgroup
 +</code>