bernardodemarco opened a new pull request, #12975: URL: https://github.com/apache/cloudstack/pull/12975
### Description Apache CloudStack currently supports live scaling only for VMs with custom constrained and custom unconstrained compute offerings. For VMs with fixed compute offerings, users must stop the VM, change its service offering through the `scaleVirtualMachine` API and then start it again. Depending on the criticality of the applications running on the VM, the downtime caused by this process is highly undesirable. Therefore, this PR introduces support for live scaling of VMs with fixed service offerings when using the KVM hypervisor in Apache CloudStack. The feature specification is available at #12908. Fixes #12908 and fixes #6865 ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [X] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [X] Major - [ ] Minor ### Screenshots (if appropriate): ### How Has This Been Tested? #### Test environment setup - Created multiple service offerings, including fixed and non-fixed offerings, with and without CPU cap enabled, with and without the dynamic scaling feature enabled: <details> <summary>Active service offerings</summary> <img width="2262" height="838" alt="Image" src="https://github.com/user-attachments/assets/a29c6633-0623-45d7-98c4-40aaf47e87fa" /> </details> - Enabled the global setting `enable.dynamic.scale.vm`. #### Definition of the domain XML of the guest VMs Verified that: - When the `enable.dynamic.scale.vm` global setting value is `false`, the domain XML of guest VMs is not prepared for live scaling; - When the `Dynamically scalable` property of service offerings is `false`, the domain XML of guest VMs is not prepared for live scaling; - When the `Dynamically scalable` property of templates is `false`, the domain XML of guest VMs is not prepared for live scaling; - When the `Dynamically scalable` property of VMs is `false`, the domain XML of guest VMs is not prepared for live scaling. #### Live scaling - Verified the possibility of live scaling VMs from and to different types of service offerings; - Verified that, when suitable, CPU quota is applied on the fly; - Verified that, when suitable, CPU quota is removed on the fly; - Verified that, when suitable, CPU quota is updated on the fly. #### `kvm.cpu.dynamic.scaling.capacity` and `kvm.memory.dynamic.scaling.capacity` settings - Verified that when the `kvm.cpu.dynamic.scaling.capacity` and `kvm.memory.dynamic.scaling.capacity` settings are equal to or less than `0`, the host maximum capacity of CPU and memory is considered to define the upper limits for live scaling. - Verified that when the `kvm.cpu.dynamic.scaling.capacity` and `kvm.memory.dynamic.scaling.capacity` settings are greater than `0`, the values of the settings are considered to define the upper limits for live scaling. #### `auto.migrate.vm.on.live.scale.insufficient.capacity` setting - Verified that when the `auto.migrate.vm.on.live.scale.insufficient.capacity` setting is true and the current host lacks sufficient compute capacity to live scale the instance, the VM is automatically migrated to a suitable host; - Verified that when the `auto.migrate.vm.on.live.scale.insufficient.capacity` setting is false and the current host lacks sufficient compute capacity to live scale the instance, the VM is not migrated to a suitable host and an error message is returned. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
