diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix index 252381d0f198bc..5598f4ad518070 100644 --- a/nixos/modules/virtualisation/azure-image.nix +++ b/nixos/modules/virtualisation/azure-image.nix @@ -67,6 +67,16 @@ in For v2, secure boot needs to be turned off during creation. ''; }; + + memSize = mkOption { + type = types.nullOr types.int; + default = null; + internal = true; + description = '' + Guest memory allocation size during image generation, in MiB. + Only change this when you face Out-Of-Memory issue in QEMU when generating image. + ''; + }; }; config = { @@ -89,7 +99,7 @@ in bootSize = "${toString cfg.bootSize}M"; partitionTableType = if (cfg.vmGeneration == "v2") then "efi" else "legacy"; - inherit (cfg) contents label; + inherit (cfg) contents label memSize; inherit (config.virtualisation) diskSize; inherit config lib pkgs; };