Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com> --- host/rootfs/file-list.mk | 1 + .../etc/s6-linux-init/run-image/service/vm-services/template/finish | 5 +++++ .../etc/s6-linux-init/run-image/service/vm-services/template/run | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk index 2b76b31dad7f73dd83c6a24f94f3ed946988bbea..36f508962c0515b2132aa9ab30cde929e2de100e 100644 --- a/host/rootfs/file-list.mk +++ b/host/rootfs/file-list.mk @@ -39,6 +39,7 @@ FILES = \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/notification-fd \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/run \ + image/etc/s6-linux-init/run-image/service/vm-services/template/finish \ image/etc/s6-linux-init/run-image/service/vm-services/template/notification-fd \ image/etc/s6-linux-init/run-image/service/vm-services/template/run \ image/etc/s6-linux-init/run-image/service/vmm/notification-fd \ diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/finish b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/finish new file mode 100755 index 0000000000000000000000000000000000000000..4448c811de5d382347b470afa07f7c90b0b08acc --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/finish @@ -0,0 +1,5 @@ +#!/usr/bin/execlineb -WS3 +# SPDX-FileCopyrightText: 2026 Demi Marie Obenour <demiobenour@gmail.com> +# SPDX-License-Identifier: EUPL-1.2+ + +cgroup-purge /vm-services.slice/vm-${3}.slice diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/run index bf90e99eef4106a9ad17dfba310b6edb3eaa64a3..7b1f20d6ffe826f92806c601572a11bac3fc5fca 100755 --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/run +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/run @@ -2,6 +2,10 @@ # SPDX-License-Identifier: EUPL-1.2+ # SPDX-FileCopyrightText: 2025 Alyssa Ross <hi@alyssa.is> +# Move into the cgroup with all per-VM services +# Do not wait for the existing processes in the slice to finish. +cgroup-setup --no-wait /vm-services.slice/vm-${1}.slice + export VM $1 s6-svscan -d3 data/service -- 2.55.0