[systemd-devel] Rebooting systemd-nspawn container results in shutdown

Lennart Poettering lennart at poettering.net
Mon Apr 27 07:06:49 PDT 2015


On Sun, 26.04.15 16:55, Kai Krakow (hurikhan77 at gmail.com) wrote:

> Hello!
> 
> I've successfully created a Gentoo container on top of a Gentoo host. I can 
> start the container with machinectl, as I can with "systemctl start ...".
> 
> Inside the container (logged in via SSH), I could issue a reboot command. 
> But that just results in the container being shutdown. It never comes back 
> unless I restart the machine with systemctl or machinectl.

What systemd versions run on the host and in the container?

if you strace the nspawn process, and then issue the reboot command,
what are the last 20 lines this generates when nspawn exits? Please
paste somewhere.

Is the service in a failed state or so when this doesn't work?

What is the log output of the service then?

> BTW: Is there a way to automatically bind-mount some directories instead of 
> "systemctl edit --full" the service file and add those?

Currently not, but there's a TODO item to add ".nspawn" files that may
be placed next to container directories with additional options.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list