Ok, I'm misunderstanding overlay option. I think that you too. In your example "systemd-nspawn --overlay=/path/to/xenial:/path/to/apache:/path/to/container -D /path/to/container" really the last path of overlay option is path INSIDE container. So systemd-nspawn refuse to init the container because /path/to/container is actually empty.
Anyways there is some request in systemd to support something like --overlay=/path/to/xenial:/path/to/apache:/ and get overlay mounted as rootfs of the container. I've written some topic in systemd-devel list asking for suggestions: https://lists.freedesktop.org/archives/systemd-devel/2016-August/037355.html Also a github issue asking for rootfs support: https://github.com/systemd/systemd/issues/3847 ** Bug watch added: github.com/systemd/systemd/issues #3847 https://github.com/systemd/systemd/issues/3847 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1594849 Title: systemd-nspawn: option --overlay not working To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1594849/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs