<div dir="ltr">Hello,<br><br>Thanks for the tip, I've taken a more recent version of systemd-nspawn and it now works.<br>I now have another question: I want to set up a signle process. I have a problem on the network side, I want to launch my signle process by connecting it to a bridge. In the .nspawn file, in the network section, I specified the use of the bridge. Then systemd-nspawn, when the container is launched, will create a pair of veths, one inside the container (host0) and the other on my host connected to the bridge. I want my host0 interface, which is inside the container, to take a static IP and the interface to be up directly when I launch my container. To do this I've created a process1.network configuration file in /etc/systemd/network<br>[Match]<br>Virtualization=container<br>Driver=veth<br>Host=process1<br><br>[Network]<br>Address=<a href="http://10.10.0.15/23">10.10.0.15/23</a><br>Gateway=10.10.0.1<br><br>I also tried mounting this file in /etc/systemd/network in my container<br>host0.network<br>[Match]<br>#Virtualization=container<br>Name=host0<br><br>[Network]<br>Address=<a href="http://10.10.0.15/23">10.10.0.15/23</a><br>Gateway=10.10.0.1<br><br>Despite these two approaches, I can't manage to allocate a static IP address to host0 when the container is launched, so I have to do it manually in the container using the :<br>ip addr add <a href="http://10.10.0.15/23">10.10.0.15/23</a> dev host0<br><br>ip link set host0 up<br><br>Shouldn't we be able to specify the container ip directly in the process1.nspawn file?<div><br><div>Thanks.<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 1 déc. 2023 à 22:22, Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fr, 01.12.23 14:03, Warex61 YTB (<a href="mailto:thomasdabout61@gmail.com" target="_blank">thomasdabout61@gmail.com</a>) wrote:<br>
<br>
> Hello,<br>
> I would like to use systemd-nspawn to create a container that can launch a<br>
> single process as pid 1 and mount its configuration files. I want the<br>
> container to be as light as possible. Is there any way of creating a<br>
> container using nspawn without using bootstrap ?<br>
><br>
> For example, using this command, without using a bootstrap<br>
><br>
> systemd-nspawn -M process -D /etc/systemd/nspawn/process<br>
> /etc/systemd/nspawn/process.nspawn<br>
> I get the following error<br>
><br>
> Directory /etc/systemd/nspawn/process doesn't look like it has an OS tree.<br>
> Refusing.<br>
> What are the conditions for nspawn to consider an OS tree in<br>
> /etc/systemd/nspawn/process ?<br>
<br>
You are using an ancient version of nspawn. Since 2y or so the message<br>
reads:<br>
<br>
Directory %s doesn't look like it has an OS tree (/usr/ directory is missing). Refusing.<br>
<br>
And that's your explanation: you need an /usr/ directory.<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Berlin<br>
</blockquote></div>