cmdline: list[PathString] = [
find_qemu_binary(config),
"-machine", machine,
- "-smp", str(config.qemu_smp),
+ "-smp", str(config.qemu_smp or os.cpu_count()),
"-m", f"{config.qemu_mem // 1024**2}M",
"-object", "rng-random,filename=/dev/urandom,id=rng0",
"-device", "virtio-rng-pci,rng=rng0,id=rng-device0",
: When used with the `qemu` verb, this options sets `qemu`'s `-smp`
argument which controls the number of guest's CPUs. Defaults to `2`.
+: When set to `0`, the number of CPUs available to the mkosi process
+ will be used.
+
`QemuMem=`, `--qemu-mem=`
: When used with the `qemu` verb, this options sets `qemu`'s `-m`
cmdline: list[PathString] = [
"systemd-vmspawn",
- "--cpus", str(config.qemu_smp),
+ "--cpus", str(config.qemu_smp or os.cpu_count()),
"--ram", str(config.qemu_mem),
"--kvm", config.qemu_kvm.to_tristate(),
"--vsock", config.qemu_vsock.to_tristate(),