Re: [PATCH] qemu: allow larger discrepency between memory & currentMemory in domain xml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/16/2012 12:01 PM, Laine Stump wrote:
> This resolves:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=873134
> 
> 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
> this:
> 
>   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
> "4000000".

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"
> libvirtd.)
> ---
>  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.

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]