Centos 7 container gets no network

Hi,

Running LXD 4.0.2 on my Gentoo system, all my containers works great, except when I try to launch a CentOS 7 machine, which doesn’t get network. Looking in the console.log, this is what I get.

Failed to mount cgroup at /sys/fs/cgroup/systemd: Operation not permitted
systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
Detected virtualization lxc.
Detected architecture x86-64.

Welcome to CentOS Linux 7 (Core)!

Failed to read AF_UNIX datagram queue length, ignoring: No such file or directory
Cannot determine cgroup we are running in: No such file or directory
Failed to allocate manager object: No such file or directory
[!!!!!!] Failed to allocate manager object, freezing.

Any ideas on what I might be able to do differently in order to get this working?

You’re missing the systemd cgroup controller on your host system.

Look at the LXC/LXD page on the Gentoo wiki, it has instructions for this.

Thanks, found the cgroup mounts part which I totally missed, so I added the ones in the wiki, which turns the console.log into this instead:

systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
Detected virtualization lxc.
Detected architecture x86-64.

Welcome to CentOS Linux 7 (Core)!

Failed to read AF_UNIX datagram queue length, ignoring: No such file or directory
Failed to install release agent, ignoring: Permission denied
Failed to create root cgroup hierarchy: Permission denied
Failed to allocate manager object: Permission denied
[!!!] Failed to allocate manager object, freezing.

I googled a bit, and stumbled across this https://github.com/lxc/lxc/issues/3183 issue, which sounds similar, but I wasn’t able to try the lxc.mount.auto = cgroup:rw:force, didn’t understand how to apply it properly, and lxc config didn’t cooperate with me. Any additional suggestions would be appreciated!