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.
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: /lists. freedesktop. org/archives/ systemd- devel/2016- August/ 037355. html
https:/
Also a github issue asking for rootfs support: /github. com/systemd/ systemd/ issues/ 3847
https:/