Skip to content

Commit 77aa7f3

Browse files
committed
cloud-hypervisor: fix devices arg
Regression introduced in Github PR #356
1 parent 91ba136 commit 77aa7f3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/runners/cloud-hypervisor.nix

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,16 @@ in {
213213
})
214214
else throw "Unsupported interface type ${type} for Cloud-Hypervisor"
215215
) interfaces)
216-
)
216+
)
217217
+ " " + # Move vfio-pci outside of
218-
(lib.concatMapStringsSep " "
219-
({ bus, path, ... }: {
220-
pci = "path=/sys/bus/pci/devices/${path}";
221-
usb = throw "USB passthrough is not supported on cloud-hypervisor";
222-
}.${bus}) devices)
223-
+ " " + lib.escapeShellArgs extraArgs;
218+
lib.concatStringsSep " " (
219+
arg "--device" (
220+
map ({ bus, path, ... }: {
221+
pci = "path=/sys/bus/pci/devices/${path}";
222+
usb = throw "USB passthrough is not supported on cloud-hypervisor";
223+
}.${bus}) devices
224+
)
225+
) + " " + lib.escapeShellArgs extraArgs;
224226

225227
canShutdown = socket != null;
226228

0 commit comments

Comments
 (0)