[libvirt] [PATCH] qemu: allow larger discrepency between memory & currentMemory in domain xml
eblake at redhat.com
Fri Nov 16 20:35:11 UTC 2012
On 11/16/2012 12:01 PM, Laine Stump wrote:
> This resolves:
> The reported problem is that an attempt to restore a saved domain that
> was configured with <currentMemory> and <memory> set to some (same for
> both) number that's not a multiple of 4096KiB results in an error like
> error: Failed to start domain libvirt_test_api
> error: XML error: current memory '4001792k' exceeds maximum '4000768k'
> For example (from the BZ) if you start qemu on RHEL6 with both
> <currentMemory> and <memory> of 4000000 (this number is in KiB),
> libvirt's dominfo or dumpxml will report "4001792" back (rounded up to
> next 4MiB) for 10-20 seconds after the start, then revert to reporting
Yuck. But we have to cope with it.
> This patch solves the problem by changing the allowed "fudge factor"
> when parsing from 1024KiB to 4096KiB to match the maximum up-rounding
> that could be done in qemu.
> (I had earlier thought to fix this by up-rounding <memory> in the
> dumpxml that's put into the saved image, but that wouldn't have fixed
> the case where the save image was produced by an "unfixed"
> src/conf/domain_conf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Long commit message compared to the actual change, but definitely an
important factor in explaining why you did it.
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 617 bytes
Desc: OpenPGP digital signature
More information about the libvir-list