Updated Branches: refs/heads/master 3c35eb498 -> 394607035
CLOUDSTACK-4041 [ZWPSFailed to migrate a ROOT volume created on zone wide primary storage While finding endpoint to send the migrate volume command, in case of zone wide storage pool, storage engine is picking a host among all connected hosts randomly. Hence a host may be from different cluster t Signed-off-by: Sateesh Chodapuneedi <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/39460703 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/39460703 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/39460703 Branch: refs/heads/master Commit: 394607035946fdda5868c6a06df55b0c3811f928 Parents: 3c35eb4 Author: Sateesh Chodapuneedi <[email protected]> Authored: Wed Aug 7 06:07:54 2013 +0530 Committer: Sateesh Chodapuneedi <[email protected]> Committed: Wed Aug 7 06:07:54 2013 +0530 ---------------------------------------------------------------------- .../com/cloud/hypervisor/vmware/resource/VmwareResource.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/39460703/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index 18dc9e8..d3b136a 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -4017,8 +4017,10 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa srcDsName = volMgr.getStoragePoolOfVolume(cmd.getVolumeId()); tgtDsName = poolTo.getUuid().replace("-", ""); - // find VM through datacenter (VM is not at the target host yet) - vmMo = srcHyperHost.findVmOnPeerHyperHost(vmName); + // find VM in this datacenter not just in this cluster. + DatacenterMO dcMo = new DatacenterMO(getServiceContext(), morDc); + vmMo = dcMo.findVm(vmName); + if (vmMo == null) { String msg = "VM " + vmName + " does not exist in VMware datacenter " + morDc.getValue(); s_logger.error(msg);
