systemd-nspawn: option --overlay not working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I have a directory with a minimal Xenial installation, which I want to share among several containers. I also have a directory with just Apache and its dependencies installed.
systemd-nspawn has an option --overlay to "Combine multiple directory trees into one overlay file system and mount it into the container."
Neither `systemd-nspawn --overlay=
Both report an error "Directory /path/to/container doesn't look like it has an OS tree. Refusing.". Of course, it doesn't have an OS tree, this is what the base overlays are for.
Looking at the source code, creating a subdirectory /path/to/
Creating mount point for overlay /path/to/
Doing this manually instead, works fine:
mount -t overlay -o lowerdir=
systemd-nspawn -D /path/to/container
1)
Description: Ubuntu 16.04 LTS
Release: 16.04
2)
systemd-container:
Installed: 229-4ubuntu6
Candidate: 229-4ubuntu6
Version table:
*** 229-4ubuntu6 500
500 http://
100 /var/lib/
229-4ubuntu4 500
500 http://
3)
I expect systemd-nspawn to mount an overlayfs with the provided directories and then start the container with all the directories combined.
4)
systemd-nspawn complains
- Directory /path/to/container doesn't look like it has an OS tree. Refusing.
and after working around this (among other irrelevant error messages)
- Creating mount point for overlay /path/to/
Status changed to 'Confirmed' because the bug affects multiple users.