LXC ubuntu container fails to start

Hi all,

on my mox, the LXC Ubuntu Cosmic container from repo.turris.cz/lxc fails to start with:

root@turris:~# lxc-start -F -n ubuntu-turris
Failed to insert module ‘autofs4’: No such file or directory
Failed to insert module ‘unix’: No such file or directory
Failed to mount cgroup at /sys/fs/cgroup/systemd: Operation not permitted
[ !!! ] Failed to mount API filesystems, freezing.
Freezing execution.

Any known workaround for this?

I got it working with the following cgroup mount:

#!/bin/sh /etc/rc.common

START=90
STOP=10

start() {
mkdir -p /sys/fs/cgroup/systemd
mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/systemd
}

Not sure though if this has any side effects…

Based on https://j2h2.com/entry/alpine-linux-and-systemd-containers-round-2

1 Like