davidjumani commented on a change in pull request #5339:
URL: https://github.com/apache/cloudstack/pull/5339#discussion_r694497464
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -5988,6 +5996,18 @@ public VirtualMachine migrateVirtualMachine(Long vmId,
Host destinationHost) thr
return findMigratedVm(vm.getId(), vm.getType());
}
+ private void checkVmDestinationServerCapacity(VMInstanceVO vm, Host
destinationHost) {
+ // check server capacity
+ ServiceOfferingVO offering = _offeringDao.findById(vm.getId(),
vm.getServiceOfferingId());
+ boolean hostHasCapacity =
_capacityMgr.checkIfHostHasCpuCapability(destinationHost.getId(),
offering.getCpu(), offering.getSpeed())
Review comment:
Would it be simpler to use `checkIfHostHasCpuCapabilityAndCapacity` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]