1

I just created a new LXC with the following command:

lxc-create -n ${NAME} -t download

I choosed debian, stretch and amd64 as characteristics. I'm using the LXC in unprivileged mode with UID/GID mappings (/etc/sub?id).

The problem is that I can't stop the LXC. Within the container I get the following message (from within the LXC):

# shutdown -h now
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory

Same thing here from host-system:

# lxc-attach -n tmp-deb9 -- shutdown now
Failed to connect to bus: No such file or directory
Failed to talk to init daemon.

Or even like this (from within the LXC):

# init 0
Couldn't find an alternative telinit implementation to spawn.

If I run the following command, it hangs forever:

lxc-stop -n ${NAME}

I tried to install dbus but the problem has not been solved.

I am not able to stop the LXC or kill the init process even from the host-system.

How could I stop the LXC?

  • This is more of a troubleshooting step than an answer: I had the same symptoms and when I ran sudo ps aux in the container it showed that systemd was not even running, causing things like shutdown or sshd to not work right. (In my case it turned out that some fool who was definitely not me ran rm -r /var/cache/ while preparing the rootfs but didn't bother to run mkdir /var/cache afterwards, and systemd was puking over that.) – rexroni Aug 21 '18 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.