This is an automated email from the ASF dual-hosted git repository.

nvazquez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new e20d57f33e0 Fix checking resources before power state check of the VM
e20d57f33e0 is described below

commit e20d57f33e008c0b508b3fe1688412a56dff6a5a
Author: nvazquez <[email protected]>
AuthorDate: Sun Oct 26 18:53:51 2025 -0300

    Fix checking resources before power state check of the VM
---
 .../vmware/src/main/java/com/cloud/hypervisor/guru/VMwareGuru.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/guru/VMwareGuru.java
 
b/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/guru/VMwareGuru.java
index 14991e483df..9e1466b7f9c 100644
--- 
a/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/guru/VMwareGuru.java
+++ 
b/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/guru/VMwareGuru.java
@@ -1408,6 +1408,7 @@ public class VMwareGuru extends HypervisorGuruBase 
implements HypervisorGuru, Co
                 throw new CloudRuntimeException(err);
             }
 
+            checkSourceVmResourcesAgainstSelectedOfferingResources(vmMo, 
requestedCpuNumber, requestedCpuSpeed, requestedMemory);
             VirtualMachinePowerState sourceVmPowerState = vmMo.getPowerState();
 
             if (sourceVmPowerState == VirtualMachinePowerState.POWERED_OFF) {
@@ -1432,8 +1433,6 @@ public class VMwareGuru extends HypervisorGuruBase 
implements HypervisorGuru, Co
                 }
             }
 
-            checkSourceVmResourcesAgainstSelectedOfferingResources(vmMo, 
requestedCpuNumber, requestedCpuSpeed, requestedMemory);
-
             logger.debug(String.format("Cloning VM %s at VMware host %s on 
vCenter %s", vmName, hostIp, vcenter));
             VirtualMachineMO clonedVM = createCloneFromSourceVM(vmName, vmMo, 
dataCenterMO);
             logger.debug(String.format("VM %s cloned successfully, to VM %s", 
vmName, clonedVM.getName()));

Reply via email to