[rhelv6-list] A question about memory ballooning

carlopmart carlopmart at gmail.com
Mon Apr 25 17:18:16 UTC 2011


On 04/25/2011 04:54 PM, Phil Meyer wrote:
> On 04/24/2011 03:07 AM, carlopmart wrote:
>> Hi all,
>>
>> How can I manage automatically memory ballooning under a kvm host
>> (RHEL5 or RHEL6)?? For example if I define a kvm guest to boot up with
>> 512MB of RAM and I have configured 1GB as a maximum memory for this
>> guest, how can I allocate this memory when guest will need it??
>>
>> And the opposite question, can memory balloon be deallocated?? And is
>> it possible to do this automatically or is an error to do this??
>>
>> Thanks.
>
> I can offer observation and research results, but I am not involved in
> the programming for KVM.
>
> First, you will notice two entries for memory in the KVM guest xml file.
>
> In order for memory to balloon up, the 'memory' parameter needs to be
> set to the max value you may ever wish to use.
>
> ---
> <memory>4194304</memory>
> <currentMemory>2097152</currentMemory>
> ---
>
> In this example, the 2GB VM could expand upwards to 4GB, but no greater.
>
> CAVEAT EMPTOR:
>
> This requires the KVM guest OS to recognize a balloon memory driver!
> Many, do not.
>
> So the observed limitations are these:
>
> 1. You cannot modify the value of 'memory' without a reboot.
> 2. You cannot reduce 'currentMemory' without a reboot.
> 3. The KVM guest OS must recognize a balloon driver.
>
> The symptoms we observed of a non functioning balloon driver in the
> guest were these:
>
> The VM guest OS assumed 'memory' as available.
> The VM guest OS was limited to 'currentMemory' but did not recognize
> changes to 'currentMemory'.
>
> Guest VMs running Linux kernel 2.6.30 or better seemed to work, with the
> exception of Ubuntu 10.4. Fedora 12 and up all functioned properly.
>

I know that. But my question is: how can I manage this automatically??

Thanks.

-- 
CL Martinez
carlopmart {at} gmail {d0t} com




More information about the rhelv6-list mailing list