It seems, you're right with the final path component in --overlay. This is the absolute path *inside* the container. I looked into nspawn's source code and the options is interpreted as follows
--overlay=lo1:lo2:up:dest lo1 and lo2 are lower directories, up is the upper directory in overlayfs terms, and all are absolute host directory paths. dest is the where the overlayfs is mounted inside the container's root directory. In order to use --overlay, I have to say --overlay=/path/to/xenial/usr:/path/to/apache/usr:/path/to/container/usr:/usr and repeat this for /etc, /bin, /sbin, /lib, /lib64, /var. So --overlay seems to work, sort of. Anyway, thank you for pushing me into the right direction. I think, I'll stay with my workaround, overlay mounting the base directories upfront, and then nspawning the container on the resulting root directory. -- 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