From f0d8f6d5b4aa876ad76875a58c12e085780539b3 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Mon, 5 Feb 2024 05:00:45 +0000 Subject: [PATCH] qemu: dont set mq=on,vectors=N for virtio-net-device Setting vcpu > 1 for qemu guests would result in the following error during guest startup: qemu-system-x86_64: -device virtio-net-device,netdev=host1, \ mac=02:00:00:00:00:01,mq=on,vectors=6: Property \ 'virtio-net-device.vectors' not found --- lib/runners/qemu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runners/qemu.nix b/lib/runners/qemu.nix index 08f5e4f8..3a86d82a 100644 --- a/lib/runners/qemu.nix +++ b/lib/runners/qemu.nix @@ -250,7 +250,7 @@ in { (microvmConfig.cpu == null && system != "x86_64-linux") ) ",romfile=" }${ - lib.optionalString tapMultiQueue ",mq=on,vectors=${toString (2 * vcpu + 2)}" + lib.optionalString (tapMultiQueue && requirePci) ",mq=on,vectors=${toString (2 * vcpu + 2)}" }" ]) interfaces )