mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-15 18:12:35 +01:00
CLOUDSTACK-5352:
CPU cap calculated incorrectly for VMs on XenServer hosts. It should not be limited by the overprovisioning and should set the cap as service offering
This commit is contained in:
parent
15c3005943
commit
71323f15c6
@ -689,7 +689,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
|
||||
if (vmSpec.getLimitCpuUse()) {
|
||||
long utilization = 0; // max CPU cap, default is unlimited
|
||||
utilization = (int)((speed * 0.99 * vmSpec.getCpus()) / _host.speed * 100);
|
||||
utilization = (int) ((vmSpec.getMaxSpeed() * 0.99 * vmSpec.getCpus()) / _host.speed * 100);
|
||||
//vm.addToVCPUsParamsLive(conn, "cap", Long.toString(utilization)); currently xenserver doesnot support Xapi to add VCPUs params live.
|
||||
callHostPlugin(conn, "vmops", "add_to_VCPUs_params_live", "key", "cap", "value", Long.toString(utilization), "vmname", vmSpec.getName());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user