From 4fa7ba0b32b3677af4ae5935ee206469dc5bfbf5 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 14 Nov 2016 14:52:40 +0100 Subject: [PATCH] qemu: process: Set current vcpu count to maximum if it was not specified Mimic qemu's behavior on the given command line. --- src/qemu/qemu_parse_command.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5