mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +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
4e74873669
commit
71d547ba87
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user