Skip to content

Commit

Permalink
Revert "qemu: support notify sockets"
Browse files Browse the repository at this point in the history
This reverts commit 3910e65.

See #313 (comment)
  • Loading branch information
astro committed Dec 24, 2024
1 parent 3910e65 commit 2ae08de
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lib/runners/qemu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ let
then "console=ttyAMA0"
else "";

supportsNotifySocket = vsock.cid != null;

in
lib.warnIf (mem == 2048) ''
Expand All @@ -155,16 +154,7 @@ lib.warnIf (mem == 2048) ''
<https://github.com/astro/microvm.nix/issues/171>
''
{
inherit tapMultiQueue supportsNotifySocket;

preStart = ''
${microvmConfig.preStart}
'' + lib.optionalString supportsNotifySocket ''
# Start socat to forward systemd notify socket over vsock
if [ -n "''${NOTIFY_SOCKET-}" ]; then
${pkgs.socat}/bin/socat VSOCK-LISTEN:8888,fork UNIX-SENDTO:$NOTIFY_SOCKET &
fi
'';
inherit tapMultiQueue;

command = lib.escapeShellArgs (
[
Expand Down Expand Up @@ -310,11 +300,6 @@ lib.warnIf (mem == 2048) ''
lib.optionals (vsock.cid != null) [
"-device"
"vhost-vsock-${devType},guest-cid=${toString vsock.cid}"
# We are *supposed* to use SMBIOS here. But somehow, no matter how much I
# tried, SMBIOS Type 11 entries simply don't work. It looks like it might
# be broken on QEMU side. Why? I don't know.
"-fw_cfg"
"name=opt/io.systemd.credentials/vmm.notify_socket,string=vsock-stream:2:8888"
]
++
extraArgs
Expand Down

0 comments on commit 2ae08de

Please sign in to comment.