Skip to content

Commit

Permalink
cloud-hypervisor: disable vmm.notify_socket for systemd>=256
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Sep 3, 2024
1 parent 69e8ac6 commit d52082c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/runners/cloud-hypervisor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down Expand Up @@ -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"
]
Expand Down

0 comments on commit d52082c

Please sign in to comment.