]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: use machine name in runtime directory path (#41530)
authorChristian Brauner <christian@amutable.com>
Mon, 6 Apr 2026 22:23:19 +0000 (00:23 +0200)
committerGitHub <noreply@github.com>
Mon, 6 Apr 2026 22:23:19 +0000 (00:23 +0200)
Replace the random hex suffix in the runtime directory with the machine
name, changing the layout from /run/systemd/vmspawn.<random> to
/run/systemd/vmspawn/<machine-name>/.

This makes runtime directories machine-discoverable from the filesystem
and groups all vmspawn instances under a shared parent directory,
similar to how nspawn uses /run/systemd/nspawn/.

Use runtime_directory_generic() instead of runtime_directory() since
vmspawn is not a service with RuntimeDirectory= set and the
$RUNTIME_DIRECTORY check in the latter never succeeds. The directory is
always created by vmspawn itself and cleaned up via
rm_rf_physical_and_freep on exit. The parent vmspawn/ directory is
intentionally left behind as a shared namespace.


Trivial merge