Hi ozaki-r,

thank you for answer. 

So, there is no posibility that guest can request for more memory (max up to maxMemory) and libvirt/hypervisor/whatever will automatically increase it? I have to do it manually?

Jaromir.


Dne 17. července 2010 13:49 Ryota Ozaki <ozaki.ryota@gmail.com> napsal(a):
Hi Jaromír
2010/7/17 Jaromír Červenka <cervajz@cervajz.com>:
> Hello,
> Could anybody explain me a little bit what is the difference between
> <currentMemory> and <maxMemory>. I use qemu-kvm hypervisor. When I have
> 1024MB maxMemory and 512MB of currentMemory, I can see just 512MB in guest
> os (free -m). Is it ok? Does it have something to do with ballooning
> technique? What happened if guest will needs more memory than 512MB?

In qemu-kvm case, currentMemory means actual amount of memory (or initial amount
of memory) which you allow the guest to use and maxMemory means the maximum
amount of memory which you (or admin) can increase up to, through libvirt.

With your setting, libvirt launches the VM with 1024MB memory and then reduces
the amount of memory down to 512MB through balloon driver. So 512MB which
you're seeing in the guest is correct and expected. Because the rest
of the memory
has been reclaimed by the hypervisor, the guest cannot gain more memory than
512MB. The answer for the question--what happened?--is that the guest OS will
behave as same as when it has just 512MB memory and gets memory pressure,
i.e., reclaim memory, do swapping, or something.

If you want to allow the guest to gain more memory, at first you need
to increase
the amount of guest memory through the balloon driver (you know you can change
the amount up to maxMemory at maximum). You can use virsh setmem for that.

  ozaki-r

> Thank you for answers :)
> Kind regards,
>
> Jaromír Červenka
> Official openSUSE community member
> Web: http://www.cervajz.com/
> Jabber: cervajz@cervajz.com
> MSN: jara.cervenka@seznam.cz
> Tel.: +420 607 592 687
> Alt. e-mails:
> jaromir.cervenka@opensuse.org,
> jaromir.cervenka@speel.cz
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>