diff options
author | emilylange <git@emilylange.de> | 2023-05-26 19:43:58 +0200 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-05-28 18:08:48 +0000 |
commit | 8a12d9d2b1d2f88a844f7b9a70bc18513868c1ad (patch) | |
tree | 3bf5b678bf57f8327148d45a901e05e3628487f3 /nixos/modules/virtualisation | |
parent | aea3db7cca1ceb36eec55ef1bf8cd563098518c0 (diff) |
nixos/qemu-vm: add `virtualisation.memorySize < 2048` assertion on 32bit
(cherry picked from commit 5dbd4f32433b4f8511c702ee8bb66e8b4fff7b87)
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/qemu-vm.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 5f6bf4b39e974..5dfc77cb428aa 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -863,7 +863,13 @@ in The address must be in the default VLAN (10.0.2.0/24). ''; } - ])); + ])) ++ [ + { assertion = pkgs.stdenv.hostPlatform.is32bit && cfg.memorySize < 2047; + message = '' + virtualisation.memorySize is above 2047, but qemu is only able to allocate 2047MB RAM on 32bit max. + ''; + } + ]; warnings = optional ( |