Nested containers w/LXD

A couple days ago, someone asked me why they should care about nested containers. It’s a good question, so I thought I’d talk about how I’m using them.

Perhaps my favourite benefit of containers is keeping workloads isolated, and not just in terms of process space. It’s also a great way to avoid dependency bit rot and version conflicts. I have containers for my home media server, for jenkins, for various database servers that I need for this project or that.

Nested LXD on Ubuntu 16.04.2 (Xenial)

Edit – 1 Jun 2017: The issue is a problematic patch that caused a breakage between 2.0.9 and 2.13. LXD 2.0.10 is currently in the SRU review queue, and once it lands in xenial-updates the problem should go away. tl;dr: Nested LXD containers on Ubuntu 16.04.2 (Xenial) will break if you’re running LXD 2.12+ on the host machine, because the Xenial cloud image ships with LXD 2.0.9 and a version conflict between host and container causes nesting to fail.