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 ed92caa..cfebcc7 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.10.2