diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index ca60529ecf1..a94a83e50ba 100644 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -1761,7 +1761,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac // unregister the VM from the source host and cleanup the associated VM files. if (vm.getHypervisorType().equals(HypervisorType.VMware)) { Long destClusterId = destPool.getClusterId(); - if (srcClusterId != null && destClusterId != null && srcClusterId != destClusterId) { + if (srcClusterId != null && destClusterId != null && !srcClusterId.equals(destClusterId)) { String srcDcName = _clusterDetailsDao.getVmwareDcName(srcClusterId); String destDcName = _clusterDetailsDao.getVmwareDcName(destClusterId); if (srcDcName != null && destDcName != null && !srcDcName.equals(destDcName)) {