From: Peter Krempa Date: Mon, 14 Nov 2016 13:52:40 +0000 (+0100) Subject: qemu: process: Set current vcpu count to maximum if it was not specified X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4fa7ba0b32b3677af4ae5935ee206469dc5bfbf5;p=libvirt.git qemu: process: Set current vcpu count to maximum if it was not specified Mimic qemu's behavior on the given command line. --- diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index ed92caa328..cfebcc739e 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -1725,6 +1725,9 @@ qemuParseCommandLineSmp(virDomainDefPtr dom, if (maxcpus == 0) goto syntax; + if (vcpus == 0) + vcpus = maxcpus; + if (virDomainDefSetVcpusMax(dom, maxcpus, xmlopt) < 0) goto error;