Skip to content

Commit 7f93206

Browse files
eadwuastro
authored andcommitted
cloud-hypervisor: add extraArgs
1 parent fdb3da8 commit 7f93206

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/runners/cloud-hypervisor.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
let
77
inherit (pkgs) lib;
88
inherit (microvmConfig) vcpu mem balloonMem user interfaces volumes shares socket devices hugepageMem graphics storeDisk storeOnDisk kernel initrdPath;
9+
inherit (microvmConfig.cloud-hypervisor) extraArgs;
910

1011
kernelPath = {
1112
x86_64-linux = "${kernel.dev}/vmlinux";
@@ -168,6 +169,8 @@ in {
168169
pci = "path=/sys/bus/pci/devices/${path}";
169170
usb = throw "USB passthrough is not supported on cloud-hypervisor";
170171
}.${bus}) devices)
172+
++
173+
extraArgs
171174
);
172175

173176
canShutdown = socket != null;

nixos-modules/microvm/options.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,12 @@ in
407407
'';
408408
};
409409

410+
cloud-hypervisor.extraArgs = mkOption {
411+
type = with types; listOf str;
412+
default = [];
413+
description = "Extra arguments to pass to cloud-hypervisor.";
414+
};
415+
410416
crosvm.extraArgs = mkOption {
411417
type = with types; listOf str;
412418
default = [];

0 commit comments

Comments
 (0)