Add maxMemory and vcpu current parameters to allow online resizing of cpu and memory of a VM
|Category:||Drivers - VM|
With the current OpenNebula using the KVM driver when a VM is created online dynamic resizing is not possible. Because in the XML definition that is generated no provisions are present that would allow upward scaling.
For the CPU these settings would be needed:
The content of this element defines the maximum number of virtual CPUs allocated for the guest OS, which must be between 1 and the maximum supported by the hypervisor.
The optional attribute current can be used to specify whether fewer than the maximum number of virtual CPUs should be enabled. Since 0.8.5
And for memory:
The run time maximum memory allocation of the guest. The initial memory specified by either the <memory> element or the NUMA cell size configuration can be increased by hot-plugging of memory to the limit specified by this element. The unit attribute behaves the same as for <memory>. The slots attribute specifies the number of slots available for adding memory to the guest. The bounds are hypervisor specific. Note that due to alignment of the memory chunks added via memory hotplug the full size allocation specified by this element may be impossible to achieve. Since 1.2.14 supported by the QEMU driver.
The maximum values I would just define in the KVM vmm driver settings file.
Enabling these would allow us to manually (e.g. using virsh commands) to scale a VM online. I'm going to create a second request to have the online scaling also enabled in OpenNebula itself.