···75 exec ${qemu}/bin/qemu-kvm \
76 -name ${vmName} \
77 -m ${toString config.virtualisation.memorySize} \
078 ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \
79 ${concatStringsSep " " config.virtualisation.qemu.networkingOptions} \
80 -virtfs local,path=/nix/store,security_model=none,mount_tag=store \
···241 ''
242 Whether to run QEMU with a graphics window, or access
243 the guest computer serial port through the host tty.
000000000000244 '';
245 };
246
···75 exec ${qemu}/bin/qemu-kvm \
76 -name ${vmName} \
77 -m ${toString config.virtualisation.memorySize} \
78+ -smp ${toString config.virtualisation.cores} \
79 ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \
80 ${concatStringsSep " " config.virtualisation.qemu.networkingOptions} \
81 -virtfs local,path=/nix/store,security_model=none,mount_tag=store \
···242 ''
243 Whether to run QEMU with a graphics window, or access
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.
257 '';
258 };
259