mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: parse: Validate that the VM has at least one cpu
Libvirt's code relies on this fact so don't allow parsing a command line which would have none. Libvirtd would crash in the post parse callback on such config.
This commit is contained in:
parent
d29ba605af
commit
4d72d80665
@ -1702,6 +1702,9 @@ qemuParseCommandLineSmp(virDomainDefPtr dom,
|
||||
if (maxcpus == 0)
|
||||
maxcpus = vcpus;
|
||||
|
||||
if (maxcpus == 0)
|
||||
goto syntax;
|
||||
|
||||
if (virDomainDefSetVcpusMax(dom, maxcpus, xmlopt) < 0)
|
||||
goto error;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user