[systemd-devel] Differences between sd-nspawn and sd-run with RootImage/RootDirectory?

Nils Kattenbeck nilskemail at gmail.com
Fri Jan 12 13:54:51 UTC 2024


Hello,

I have come across the issue for rootless sd-nspawn and - while
formulating a comment thereunder - read a bit more in a few man pages
(systemd and podman related).
While doing so the question arose whether there are any technical,
under the hood differences between nspawn and systemd.exec's
`RootDirectory=/RootImage=` options.
It seems like they would provide the same functionality.
Can `systemd-spawn` or `systemd-run --property=...` achieve something
the other one is not capable of doing? Are they maybe even using the
same logic under the hood?

I would greatly appreciate any information which might clarify the
differences or lack thereof.
Kind regards,
Nils


More information about the systemd-devel mailing list