[systemd-devel] Systemd-nspawn single process
Lennart Poettering
lennart at poettering.net
Fri Dec 1 21:22:27 UTC 2023
On Fr, 01.12.23 14:03, Warex61 YTB (thomasdabout61 at gmail.com) wrote:
> Hello,
> I would like to use systemd-nspawn to create a container that can launch a
> single process as pid 1 and mount its configuration files. I want the
> container to be as light as possible. Is there any way of creating a
> container using nspawn without using bootstrap ?
>
> For example, using this command, without using a bootstrap
>
> systemd-nspawn -M process -D /etc/systemd/nspawn/process
> /etc/systemd/nspawn/process.nspawn
> I get the following error
>
> Directory /etc/systemd/nspawn/process doesn't look like it has an OS tree.
> Refusing.
> What are the conditions for nspawn to consider an OS tree in
> /etc/systemd/nspawn/process ?
You are using an ancient version of nspawn. Since 2y or so the message
reads:
Directory %s doesn't look like it has an OS tree (/usr/ directory is missing). Refusing.
And that's your explanation: you need an /usr/ directory.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list