diff options
author | Graham Christensen <graham@grahamc.com> | 2017-04-24 21:30:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 21:30:39 -0400 |
commit | 3ab98d0971e68ec115c6ffaa259e0e72aedbc80a (patch) | |
tree | e1e93a32f7ee1982e562c4b8c3ccc1e50ad5a521 /nixos/modules/virtualisation | |
parent | 75441dd64ac0a7f87ad9ee44574d829263792fef (diff) | |
parent | 4585fdb9d462d8f91ca819f7c0b398cfc47745db (diff) | |
download | nixlib-3ab98d0971e68ec115c6ffaa259e0e72aedbc80a.tar nixlib-3ab98d0971e68ec115c6ffaa259e0e72aedbc80a.tar.gz nixlib-3ab98d0971e68ec115c6ffaa259e0e72aedbc80a.tar.bz2 nixlib-3ab98d0971e68ec115c6ffaa259e0e72aedbc80a.tar.lz nixlib-3ab98d0971e68ec115c6ffaa259e0e72aedbc80a.tar.xz nixlib-3ab98d0971e68ec115c6ffaa259e0e72aedbc80a.tar.zst nixlib-3ab98d0971e68ec115c6ffaa259e0e72aedbc80a.zip |
Merge pull request #24999 from grahamc/qemu
qemu module: add virtualisation.cores option
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/qemu-vm.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 1933f11d1fff..c75edfcd8cf6 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -75,6 +75,7 @@ let exec ${qemu}/bin/qemu-kvm \ -name ${vmName} \ -m ${toString config.virtualisation.memorySize} \ + -smp ${toString config.virtualisation.cores} \ ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \ ${concatStringsSep " " config.virtualisation.qemu.networkingOptions} \ -virtfs local,path=/nix/store,security_model=none,mount_tag=store \ @@ -244,6 +245,18 @@ in ''; }; + virtualisation.cores = + mkOption { + default = 1; + type = types.int; + description = + '' + Specify the number of cores the guest is permitted to use. + The number can be higher than the available cores on the + host system. + ''; + }; + virtualisation.pathsInNixDB = mkOption { default = []; |