Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

A running vm cannot dynamically scale cpu and memory. It can be expanded when stopped #6865

Open
1450793561 opened this issue Nov 2, 2022 · 9 comments

Comments

@1450793561
Copy link

Questrion:

A running vm cannot dynamically scale cpu and memory.It's done when stopped

log detail

2022-11-02 14:44:13,311 INFO  [c.c.c.ClusterManagerImpl] (Cluster-Heartbeat-1:ctx-57dd945c) (logid:00501acf) Management node 1 is detected inactive by timestamp but is pingable
2022-11-02 14:44:13,629 DEBUG [c.c.a.ApiServlet] (qtp1462044018-848:ctx-5aeed521) (logid:1b967db1) ===START===  10.10.130.13 -- GET  virtualmachineid=beb97c61-bf41-4b38-ad74-1c65f6c5b125&keyword=&page=1&pageSize=10&details=min&response=json&command=listServiceOfferings
2022-11-02 14:44:13,649 DEBUG [c.c.a.ApiServer] (qtp1462044018-848:ctx-5aeed521 ctx-f8220033) (logid:1b967db1) CIDRs from which account 'Acct[2135826d-4dcd-11ed-89f1-02e685806f48-admin] -- Account {"id": 2, "name": "admin", "uuid": "2135826d-4dcd-11ed-89f1-02e685806f48"}' is allowed to perform API calls: 0.0.0.0/0,::/0
2022-11-02 14:44:13,663 WARN  [c.c.a.d.ParamGenericValidationWorker] (qtp1462044018-848:ctx-5aeed521 ctx-f8220033) (logid:1b967db1) Received unknown parameters for command listServiceOfferings. Unknown parameters : details

微信图片_20221102150406

@1450793561 1450793561 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2022
@DaanHoogland
Copy link
Contributor

yes @1450793561 , this is a known limitation. I thought we had made sure the button was greyed or even omitted when the VM is running. What version did you encounter this with?

@1450793561 1450793561 reopened this Nov 8, 2022
@1450793561
Copy link
Author

1450793561 commented Nov 8, 2022

@DaanHoogland

CloudStack 4.17.1.0,Is there a repair plan?

@DaanHoogland
Copy link
Contributor

@1450793561 I don´t know if it is on someones schedule, so i'm afraid not.

@1450793561
Copy link
Author

yeh,ok

@weizhouapache weizhouapache added this to the 4.18.1.0 milestone Jan 10, 2023
@weizhouapache weizhouapache self-assigned this Jan 10, 2023
@weizhouapache
Copy link
Member

@1450793561
as @DaanHoogland mentioned, this is a known limitation, introduced by #4878
the UI change was introduced in #5923

        if (vmHypervisorType.equals(HypervisorType.KVM) && !currentServiceOffering.isDynamic()) {
            String message = String.format("Unable to live scale VM on KVM when current service offering is a \"Fixed Offering\". KVM needs the tag \"maxMemory\" to live scale and it is only configured when VM is deployed with a custom service offering and \"Dynamic Scalable\" is enabled.");
            s_logger.info(message);
            throw new InvalidParameterValueException(message);

maybe @GutoVeronezi can have a look to see if it is possible to improve it in the future.
for example, scale a running vm on kvm from a fixed offering to another fixed offering

@GutoVeronezi
Copy link
Contributor

Hello @1450793561 @weizhouapache

KVM requires defining ranges for CPU and memory in the VM XML to allow the VM to be dynamically scaled. Currently, those ranges are set only when working with custom compute offerings. For custom-constrained offerings, the ranges are defined while creating them; for custom-unconstrained offerings, the ranges are defined via the global settings vm.serviceoffering.cpu.cores.max and vm.serviceoffering.ram.size.max, or, if the settings are 0, they are defined according to the host capacities.

As KVM supports dynamic scaling, this situation is a matter of designing the logical solution in ACS. We are planning to extend ACS to allow dynamic scaling VMs with fixed offerings in KVM; however, we do not have a due date yet.


@1450793561, while a VM with fixed offering cannot be dynamically scaled yet, you could try using custom offerings. Along with the custom offerings, some configurations have to be done:

  • in the global settings, enable.dynamic.scale.vm must be true;
  • the template and the VM must be marked as Dynamically scalable;

VMs started after setting those configurations will be able to be dynamically scaled. If you have any doubts or issues using this alternative, just ping me in this issue.

@weizhouapache
Copy link
Member

Hello @1450793561 @weizhouapache

KVM requires defining ranges for CPU and memory in the VM XML to allow the VM to be dynamically scaled. Currently, those ranges are set only when working with custom compute offerings. For custom-constrained offerings, the ranges are defined while creating them; for custom-unconstrained offerings, the ranges are defined via the global settings vm.serviceoffering.cpu.cores.max and vm.serviceoffering.ram.size.max, or, if the settings are 0, they are defined according to the host capacities.

As KVM supports dynamic scaling, this situation is a matter of designing the logical solution in ACS. We are planning to extend ACS to allow dynamic scaling VMs with fixed offerings in KVM; however, we do not have a due date yet.

@1450793561, while a VM with fixed offering cannot be dynamically scaled yet, you could try using custom offerings. Along with the custom offerings, some configurations have to be done:

  • in the global settings, enable.dynamic.scale.vm must be true;
  • the template and the VM must be marked as Dynamically scalable;

VMs started after setting those configurations will be able to be dynamically scaled. If you have any doubts or issues using this alternative, just ping me in this issue.

Great, thanks @GutoVeronezi for your detailed explanation.
Looking forward to the improvement.

@CodeBleu
Copy link

@rohityadavcloud This is a pretty important feature and was wondering if this could be placed in a milestone and assigned?

@GutoVeronezi
Copy link
Contributor

GutoVeronezi commented Dec 11, 2024

Hello @CodeBleu,

We had some other priorities in the past 2 years and, unfortunately, we were not able develop this improvement so far. However, we are planning to implement it in the next months, probably being addressed publicly on 4.21. We will update you as we make progress on this matter.

We already have some use-cases to base the improvement on; however, feel free to share your opinion on how you expect this feature to work.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Development

No branches or pull requests

8 participants