CLOUDSTACK-2701 - Enable storage migration for VMware resources Sending command MigrateWithStorageCommand to source host instead of target host for the case of migration of VM within cluster.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f3e3aaac Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f3e3aaac Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f3e3aaac Branch: refs/heads/vmware-storage-motion Commit: f3e3aaac1c43bdbcaf40e62b34a87cfff788de90 Parents: eac87e8 Author: Sateesh Chodapuneedi <[email protected]> Authored: Mon May 27 22:58:11 2013 +0530 Committer: Sateesh Chodapuneedi <[email protected]> Committed: Tue May 28 16:55:38 2013 +0530 ---------------------------------------------------------------------- .../motion/VmwareStorageMotionStrategy.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f3e3aaac/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java b/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java index 1678a04..c32d3d5 100644 --- a/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java +++ b/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java @@ -172,8 +172,8 @@ public class VmwareStorageMotionStrategy implements DataMotionStrategy { volumeToFilerto.put(volumeTo, filerTo); } - MigrateWithStorageCommand command = new MigrateWithStorageCommand(to, volumeToFilerto); - MigrateWithStorageAnswer answer = (MigrateWithStorageAnswer) agentMgr.send(destHost.getId(), command); + MigrateWithStorageCommand command = new MigrateWithStorageCommand(to, volumeToFilerto, destHost.getGuid()); + MigrateWithStorageAnswer answer = (MigrateWithStorageAnswer) agentMgr.send(srcHost.getId(), command); if (answer == null) { s_logger.error("Migration with storage of vm " + vm + " failed."); throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost);
