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 <sateesh@apache.org>
This commit is contained in:
Sateesh Chodapuneedi 2013-08-07 06:07:54 +05:30
parent 3c35eb4980
commit 3946070359
1 changed files with 4 additions and 2 deletions

View File

@ -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);