LXD, Debian containers and systemd

I have been playing around with LXD the past few nights, and so far I really like it. It’s like VMs, but as a container, in contrast with Docker, which is designed around running a single application as a container.

In order to try LXD out I installed a Ubuntu 15.10 VM and added the LXD stable PPA. Then it was time to launch some containers!

Shortly after I hit a problem: I could not stop the container I just created! It would just hang there, so I had to stop it forcefully:

That doesn’t look good at all. Digging around I found the issue on GitHub, which basically concludes that it’s a systemd issue, because it doesn’t seem to handle SIGPWR correctly. Oh boy. The systemd issue is still open on Launchpad, so what do we do then? Well, we get rid of systemd. Let’s prepare a base Debian Jessie image with good old SysV init, shall we?

Now all containers we create with our new and shiny image will stop gracefully.