]> git.ipfire.org Git - thirdparty/systemd.git/commit
vmspawn: use machine name in runtime directory path 41530/head
authorChristian Brauner <brauner@kernel.org>
Wed, 1 Apr 2026 13:59:13 +0000 (15:59 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 6 Apr 2026 20:09:55 +0000 (22:09 +0200)
commitccecae0efde6651dd8e50e0b7729eda028780657
tree960430739fc9e4e4e6ee1651f906133a185d4fd2
parent454d9c1be1056dcf439e73ba550f545d543fffcf
vmspawn: use machine name in runtime directory path

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.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
src/vmspawn/vmspawn.c