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

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed May 27 15:39:56 UTC 2015


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.

- 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.

Rodrigo Trujillo

On 05/26/2015 03:12 PM, Crístian Deives wrote:
> This patchset breaks some tests when running "make check" on Fedora 21.
>
> Also, why do we need to create the subresource "memdevices"? Why can't 
> we hotplug memory by setting a new value to the VM 'memory', as in:
>
> PUT /vms/myvm {'memory': 1000}
>
>
> On 25-05-2015 18:18, Rodrigo Trujillo wrote:
>> This patchset implements the backend part of memory hotplug 
>> functionality,
>> including:
>> - new feature test to check if libvirt supports memory devices
>> - changes the way that memory is assigned or updated in the guest xml:
>>     * memory is now set in a basic NUMA node
>> - includes maxMemory element in the XML:
>>     * which is equal the total memory of the host
>>     * sets memory device slots. The total number of slots are equal the
>>            maxMemory minus the memory assigned (1 slot == 1 GB )
>> - creates a new VM device, the memory device:
>>     * by default, a memory device will have 1GB
>>     * user can add the memory device with machine running or offline
>> - memory devices are selected according to its position in the xml 
>> (the slot)
>>    0, 1, 2, etc
>>
>> URL:
>>     - http://localhost:8010/vms/<VM>/memdevices
>>     - http://localhost:8010/vms/<VM>/memdevices/<MEM-DEV>
>>
>> Rodrigo Trujillo (5):
>>    [Memory HotPlug] Feature test to check support to memory devices
>>    [Memory HotPlug] Add maxMemory and numa configuration to guest xml
>>    [Memory HotPlug] Memory device control and model classes
>>    [Memory HotPlug] Add parameters checking  and documentation to memory
>>      device API
>>    [Memory HotPlug] Fix VM offline memory update and fix slots 
>> assignment
>>
>>   docs/API.md                         | 16 +++++++
>>   src/kimchi/API.json                 | 14 +++++-
>>   src/kimchi/control/vm/memdevices.py | 47 +++++++++++++++++++
>>   src/kimchi/i18n.py                  |  5 ++
>>   src/kimchi/model/config.py          |  3 ++
>>   src/kimchi/model/featuretests.py    | 43 +++++++++++++++++
>>   src/kimchi/model/vmmemdevices.py    | 94 
>> +++++++++++++++++++++++++++++++++++++
>>   src/kimchi/model/vms.py             | 77 
>> +++++++++++++++++++++++++-----
>>   src/kimchi/vmtemplate.py            | 40 ++++++++++++----
>>   9 files changed, 316 insertions(+), 23 deletions(-)
>>   create mode 100644 src/kimchi/control/vm/memdevices.py
>>   create mode 100644 src/kimchi/model/vmmemdevices.py
>>
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list