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:
Nitin Mehta 2013-12-04 14:53:28 -08:00
parent 4e74873669
commit 71d547ba87

View File

@ -1361,7 +1361,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));