From d52082cc2668b8cd788e3133526c8693ee71f6a5 Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 3 Sep 2024 20:43:08 +0200 Subject: [PATCH] cloud-hypervisor: disable vmm.notify_socket for systemd>=256 --- lib/runners/cloud-hypervisor.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/runners/cloud-hypervisor.nix b/lib/runners/cloud-hypervisor.nix index ad1579db..b883143a 100644 --- a/lib/runners/cloud-hypervisor.nix +++ b/lib/runners/cloud-hypervisor.nix @@ -85,6 +85,9 @@ let vulkan = true; }; + # systemd>=256 hangs at stage-2 on notifying X_SYSTEMD_HOSTNAME + doNotify = builtins.compareVersions pkgs.systemd.version "256" < 0; + in { inherit tapMultiQueue; @@ -96,7 +99,7 @@ in { rm -f '${socket}' ''} - + '' + lib.optionalString doNotify '' # Ensure notify sockets are removed if cloud-hypervisor didn't exit cleanly the last time rm -f notify.vsock notify.vsock_8888 @@ -136,6 +139,9 @@ in { "--cmdline" "${kernelConsole} reboot=t panic=-1 ${toString microvmConfig.kernelParams}" "--seccomp" "true" "--memory" memOps + ] + ++ + lib.optionals doNotify [ "--platform" "oem_strings=[io.systemd.credential:vmm.notify_socket=vsock-stream:2:8888]" "--vsock" "cid=3,socket=notify.vsock" ]