systemd with unified control group hierarchy
PPA description
Systemd upstream now defaults to using unified control group hierarchy. In Ubuntu up to Hirsute this change is reverted in the systemd package to avoid regressions. Current plan is to not remove cgroups v1 before Ubuntu Impish (21.10). See bugs.launchpad.net/ubuntu/+source/snapd/+bug/1850667.
As most other distribution have already switched to unified control group hierarchy, Ubuntu containers that run systemd inside cannot be started anymore. A work-around is to manually mount systemd cgroup hierarchy on the host after boot before starting LXD:
sudo mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/system
If snap is not required to run within the Ubuntu container systemd packages provided by this PPA can be used, as they go with upstream's default cgroup hierarchy.
Installation:
Host:
- Reboot with enabled cgroup hybrid mode by adding systemd.unified_cgroup_hierarchy=0 as kernel boot parameter
- Create directory for systemd cgroup v1 hierarchy:
sudo mkdir -p /sys/fs/cgroup/system
sudo mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/system
- Restart LXD, then start Ubuntu Focal container and log in
Container:
- Install this PPA's systemd packages
- Optionally, remove lxd snap (for nested containers), which may be buggy
Host:
- Restart Ubuntu container
The Ubuntu container should then work on a unified cgroup host.
Adding this PPA to your system
You can update your system with unsupported packages from this untrusted PPA by adding ppa:rdratlos/systemd to your system's Software Sources. (Read about installing)
sudo add-apt-repository ppa:rdratlos/systemd sudo apt update
For questions and bugs with software in this PPA please contact rdratlos.
PPA statistics
- Activity
- 0 updates added during the past month.
Overview of published packages
1 → 1 of 1 result | First • Previous • Next • Last |
Package | Version | Uploaded by |
---|---|---|
systemd | 245.4-4ubuntu3.8~cgroupv2 (Newer version available) | rdratlos () |
1 → 1 of 1 result | First • Previous • Next • Last |