Systemd failing

Skip to first unread message

Saint Michael

Oct 14, 2021, 10:39:10 AM10/14/21
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

Oct 14, 2021, 1:00:17 PM10/14/21
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
> To view this discussion on the web visit

Saint Michael

Oct 14, 2021, 1:09:33 PM10/14/21
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

Oct 14, 2021, 1:55:45 PM10/14/21
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

Oct 18, 2021, 3:26:58 PM10/18/21
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
0 new messages