mirror of https://github.com/apache/cloudstack.git
XS host free memory might change, if user manually changes dom0 memory,
this patch makes CS update latest XS host free memory on host connect process.
This commit is contained in:
parent
401e0ca0ba
commit
a1d09ae16f
|
|
@ -6035,7 +6035,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||
Set<VM> vms = host.getResidentVMs(conn);
|
||||
for (VM vm : vms) {
|
||||
if (vm.getIsControlDomain(conn)) {
|
||||
dom0Ram = vm.getMemoryDynamicMax(conn);
|
||||
dom0Ram = vm.getMemoryStaticMax(conn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
|
|||
|
||||
CapacityVO cpuCap = _capacityDao.findByHostIdType(host.getId(), CapacityVO.CAPACITY_TYPE_CPU);
|
||||
CapacityVO memCap = _capacityDao.findByHostIdType(host.getId(), CapacityVO.CAPACITY_TYPE_MEMORY);
|
||||
|
||||
memCap.setTotalCapacity(host.getTotalMemory());
|
||||
if (cpuCap != null && memCap != null){
|
||||
|
||||
long hostTotalCpu = host.getCpus().longValue() * host.getSpeed().longValue();
|
||||
|
|
|
|||
Loading…
Reference in New Issue