]> xenbits.xensource.com Git - libvirt.git/commit
qemu: adjust maxmem/maxvcpu computation
authorEric Blake <eblake@redhat.com>
Fri, 24 Jan 2014 17:52:23 +0000 (10:52 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 20 Feb 2014 18:27:16 +0000 (11:27 -0700)
commit60f7303c151cccdbe214b9f9ac59ecaf95cbf24b
tree81d3f3b2e59b11ae4e16e70805c2d022a1c434e2
parent2d2f29d232035b65ac15a385d87e18f97c796920
qemu: adjust maxmem/maxvcpu computation

https://bugzilla.redhat.com/show_bug.cgi?id=1038363

If a domain has a different maximum for persistent and live maxmem
or max vcpus, then it is possible to hit cases where libvirt
refuses to adjust the current values or gets halfway through
the adjustment before failing.  Better is to determine up front
if the change is possible for all requested flags.

Based on an idea by Geoff Franks.

* src/qemu/qemu_driver.c (qemuDomainSetMemoryFlags): Compute
correct maximum if both live and config are being set.
(qemuDomainSetVcpusFlags): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_driver.c