Skip to content

Commit 0e47334

Browse files
committed
server: remove checkVmDestinationServerCapacity
1 parent 166ea33 commit 0e47334

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5998,18 +5998,6 @@ public VirtualMachine migrateVirtualMachine(Long vmId, Host destinationHost) thr
59985998
return findMigratedVm(vm.getId(), vm.getType());
59995999
}
60006000

6001-
private void checkVmDestinationServerCapacity(VMInstanceVO vm, Host destinationHost) {
6002-
// check server capacity
6003-
ServiceOfferingVO offering = _offeringDao.findById(vm.getId(), vm.getServiceOfferingId());
6004-
boolean hostHasCapacity = _capacityMgr.checkIfHostHasCpuCapability(destinationHost.getId(), offering.getCpu(), offering.getSpeed())
6005-
&& _capacityMgr.checkIfHostHasCapacity(destinationHost.getId(), offering.getCpu() * offering.getSpeed(), offering.getRamSize() * 1024L * 1024L, false,
6006-
_capacityMgr.getClusterOverProvisioningFactor(destinationHost.getClusterId(), Capacity.CAPACITY_TYPE_CPU),
6007-
_capacityMgr.getClusterOverProvisioningFactor(destinationHost.getClusterId(), Capacity.CAPACITY_TYPE_MEMORY), false);
6008-
if (!hostHasCapacity) {
6009-
throw new InvalidParameterValueException("Destination host, hostId: " + destinationHost.getId() + " do not have enough capacity");
6010-
}
6011-
}
6012-
60136001
private DeployDestination chooseVmMigrationDestination(VMInstanceVO vm, Host srcHost) {
60146002
vm.setLastHostId(null); // Last host does not have higher priority in vm migration
60156003
final ServiceOfferingVO offering = _offeringDao.findById(vm.getId(), vm.getServiceOfferingId());

0 commit comments

Comments
 (0)