[systemd-devel] stopping a systemd-nspwan container

Kevin Wilson wkevils at gmail.com
Sat Mar 22 07:35:19 PDT 2014


Hello,

I had created a container according to systemd-nspwan man page and
ran it by:
systemd-nspawn -D/srv/mycontainer

I killed it by  pkill systemd-nspaw (and not by poweroff from within the
container).

Now, running "machinectl" shows that the container still runs:
machinectl
MACHINE                          CONTAINER SERVICE
mycontainer                      container nspawn

1 machines listed.

but the following is strange:

Running:
systemd-nspawn -D/srv/mycontainer
gives:
Spawning namespace container on /srv/mycontainer (console is /dev/pts/2).
Init process in the container running as PID 2305.
Failed to register machine: File exists
Container failed with error code 239.

(and running it again gives the same result but with a different pid
number).

Is there a way to shut down the container which is running in such a
scenario ?

regards,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140322/dc2e345a/attachment.html>


More information about the systemd-devel mailing list