Systemd failing

4 views
Skip to first unread message

Saint Michael

unread,
Oct 14, 2021, 10:39:10 AMOct 14
to LXC users mailing-list
I have a problem after copying a container to a different box with rsync
rsync -qarlptog -stats --partial --progress --numeric-ids -e 'ssh -C
-p22' ngnx1 root@XXXXXXX:/var/lib/lxc/name .
The container works fine at the original box, but after transferring
it, systemctl fails
Failed to get D-Bus connection: No such file or directory
and resinstalling dbus and even systems does not fix the issue.

Note: on the host I did this: (it made it work)
mkdir -p /sys/fs/cgroup/systemd
mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/systemd

But, every time I reboot the host, do I need to mount /sys/fs/cgroup/systemd?
How is it going to affect my other 9 containers that never needed this?
Can somebody explain what is going on in laymen terms?

Stéphane Graber

unread,
Oct 14, 2021, 1:00:17 PMOct 14
to Saint Michael, LXC users mailing-list
Systemd requires the name=systemd cgroup for process tracking, so it's
correct that you do have to get it mounted on your host system if not
already there.

This will not have any impact on other containers as they just won't
use that cgroup.
> --
> You received this message because you are subscribed to the Google Groups "lxc-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to lxc-users+...@lists.linuxcontainers.org.
> To view this discussion on the web visit https://groups.google.com/a/lists.linuxcontainers.org/d/msgid/lxc-users/CAC9cSOAtZTG5pwx8nvkv%2BGo7peZs5kG%2BZo3Jn2WH4%2BQYQ18nOw%40mail.gmail.com.

Saint Michael

unread,
Oct 14, 2021, 1:09:33 PMOct 14
to Stéphane Graber, LXC users mailing-list
how can I do the mounting automatically?
Maybe inside the config file for the container?

Stéphane Graber

unread,
Oct 14, 2021, 1:55:45 PMOct 14
to Saint Michael, LXC users mailing-list
Since it's a system thing that needs to be done exactly once, I'd
recommend using an init script on the host instead.

Ede Wolf

unread,
Oct 18, 2021, 3:26:58 PMOct 18
to lxc-...@lists.linuxcontainers.org
I may be completely off track here, but I've once had a similar, not
identical, problem and got it fixed by adding:

lxc.init.cmd = /lib/systemd/systemd systemd.unified_cgroup_hierarchy=1

to the containers config file. Not to be added to the global lxc.conf.



Am 14.10.21 um 19:09 schrieb Saint Michael:
Reply all
Reply to author
Forward
0 new messages