Skip to content

Commit

Permalink
cloud-hypervisor: add extraArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
eadwu authored and astro committed Mar 1, 2024
1 parent fdb3da8 commit 7f93206
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/runners/cloud-hypervisor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
let
inherit (pkgs) lib;
inherit (microvmConfig) vcpu mem balloonMem user interfaces volumes shares socket devices hugepageMem graphics storeDisk storeOnDisk kernel initrdPath;
inherit (microvmConfig.cloud-hypervisor) extraArgs;

kernelPath = {
x86_64-linux = "${kernel.dev}/vmlinux";
Expand Down Expand Up @@ -168,6 +169,8 @@ in {
pci = "path=/sys/bus/pci/devices/${path}";
usb = throw "USB passthrough is not supported on cloud-hypervisor";
}.${bus}) devices)
++
extraArgs
);

canShutdown = socket != null;
Expand Down
6 changes: 6 additions & 0 deletions nixos-modules/microvm/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ in
'';
};

cloud-hypervisor.extraArgs = mkOption {
type = with types; listOf str;
default = [];
description = "Extra arguments to pass to cloud-hypervisor.";
};

crosvm.extraArgs = mkOption {
type = with types; listOf str;
default = [];
Expand Down

0 comments on commit 7f93206

Please sign in to comment.