Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #24999 from grahamc/qemu

qemu module: add virtualisation.cores option

authored by Graham Christensen and committed by GitHub 3ab98d09 75441dd6

+13
+13
nixos/modules/virtualisation/qemu-vm.nix
··· 75 75 exec ${qemu}/bin/qemu-kvm \ 76 76 -name ${vmName} \ 77 77 -m ${toString config.virtualisation.memorySize} \ 78 + -smp ${toString config.virtualisation.cores} \ 78 79 ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \ 79 80 ${concatStringsSep " " config.virtualisation.qemu.networkingOptions} \ 80 81 -virtfs local,path=/nix/store,security_model=none,mount_tag=store \ ··· 241 242 '' 242 243 Whether to run QEMU with a graphics window, or access 243 244 the guest computer serial port through the host tty. 245 + ''; 246 + }; 247 + 248 + virtualisation.cores = 249 + mkOption { 250 + default = 1; 251 + type = types.int; 252 + description = 253 + '' 254 + Specify the number of cores the guest is permitted to use. 255 + The number can be higher than the available cores on the 256 + host system. 244 257 ''; 245 258 }; 246 259