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
d8fd962a73
commit
4238ac9e68
|
|
@ -5929,7 +5929,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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -593,7 +593,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