[Kimchi-devel] [PATCH 0/5] [Memory HotPlug] Implements backend of memory device hotplug

Crístian Deives cristiandeives at gmail.com
Wed May 27 17:19:06 UTC 2015


On 27-05-2015 12:39, Rodrigo Trujillo wrote:
> Hi Cristian,
>
> "why create memdevides ?"
> this is all about the way libvirt and memory hotplug works. Let me try 
> to explain:
> - it is possible to set in guest xml two elements:  <memory> and 
> <currentmemory>.  The first is the max amount of memory allocated to 
> guest when libvirt starts it, the second is the memory the guest will 
> "see". You can increase and decrease currentmemory with guest running, 
> but you are not actually hotadding memory, you are using the 
> ballooning module of the guest.

Changes to a VM's XML configuration are not applied to a running system, 
so changing the memory value via XML on a running VM isn't expected to 
update the VM memory, only after reboot.

> - on the other side, we can attach (hotplug) a memory device to the 
> guest (like attach a network device), this is different then using the 
> ballooning. And values can higher than <memory>. In fact, this is the 
> only way to increase <memory> on running guests.

It's not. You can use the function "dom.setMemory[Flags]", which seems 
like a much easier way of implementing this feature.

And even if you really need to attach a memory device to a VM, wouldn't 
it be simpler for the user to just set a memory value? Then Kimchi will 
add/remove devices as needed.



More information about the Kimchi-devel mailing list