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
        
Technical details about this PPA

This PPA can be added to your system manually by copying the lines below and adding them to your system's software sources.

deb https://ppa.launchpadcontent.net/rdratlos/systemd/ubuntu focal main 
deb-src https://ppa.launchpadcontent.net/rdratlos/systemd/ubuntu focal main 
Signing key:
1024R/B5DAE472B7B902FBF3B46EF302C968ED61B873BC (What is this?)
Fingerprint:
B5DAE472B7B902FBF3B46EF302C968ED61B873BC

For questions and bugs with software in this PPA please contact rdratlos.

PPA statistics

Activity
0 updates added during the past month.
View package details

Overview of published packages

11 of 1 result
Package Version Uploaded by
systemd 245.4-4ubuntu3.8~cgroupv2 (Newer version available) rdratlos ()
11 of 1 result

Latest updates

  • systemd 177 weeks ago
    Successfully built