weizhouapache commented on a change in pull request #5339:
URL: https://github.com/apache/cloudstack/pull/5339#discussion_r694579868



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -4935,9 +4935,17 @@ public void finalizeStop(VirtualMachineProfile profile, 
Answer answer) {
         boolean deployOnGivenHost = false;
         if (destinationHost != null) {
             s_logger.debug("Destination Host to deploy the VM is specified, 
specifying a deployment plan to deploy the VM");
-            plan = new DataCenterDeployment(vm.getDataCenterId(), 
destinationHost.getPodId(), destinationHost.getClusterId(), 
destinationHost.getId(), null, null);
-            if (!AllowDeployVmIfGivenHostFails.value()) {
-                deployOnGivenHost = true;
+            try {
+                checkVmDestinationServerCapacity(vm, destinationHost);

Review comment:
       @davidjumani  I will change it.thanks




-- 
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]


Reply via email to