mirror of https://github.com/apache/cloudstack.git
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
b7da94f764
commit
1de00b6fce
|
|
@ -1323,7 +1323,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||
|
||||
if (vmSpec.getLimitCpuUse()) {
|
||||
// CPU cap is per VM, so need to assign cap based on the number of vcpus
|
||||
utilization = (int) ((speed * 0.99 * vmSpec.getCpus()) / _host.speed * 100);
|
||||
utilization = (int) ((vmSpec.getMaxSpeed() * 0.99 * vmSpec.getCpus()) / _host.speed * 100);
|
||||
}
|
||||
|
||||
vcpuParams.put("weight", Integer.toString(cpuWeight));
|
||||
|
|
|
|||
Loading…
Reference in New Issue