Updated Branches:
  refs/heads/4.3 8454885fb -> 2d90ee469

Fix for live migration of vm. Use the host name as the migration
destination. Also mapped the vm state corrected in check vm on host
answer.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2d90ee46
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2d90ee46
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2d90ee46

Branch: refs/heads/4.3
Commit: 2d90ee469a047e8b42dd81f3723240f18b591d5e
Parents: 8454885
Author: Devdeep Singh <[email protected]>
Authored: Wed Dec 4 02:27:27 2013 +0530
Committer: Devdeep Singh <[email protected]>
Committed: Tue Dec 3 19:31:22 2013 +0530

----------------------------------------------------------------------
 .../HypervResource/HypervResourceController.cs               | 2 +-
 .../DotNet/ServerResource/HypervResource/WmiCallsV2.cs       | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d90ee46/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
index fc4dea5..915816d 100644
--- 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -738,7 +738,7 @@ namespace HypervResource
                 }
                 else
                 {
-                    state = EnabledState.ToString(sys.EnabledState); // TODO: 
V2 changes?
+                    state = EnabledState.ToCloudStackState(sys.EnabledState); 
// TODO: V2 changes?
                     result = true;
                 }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d90ee46/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
index c020168..c69ec38 100644
--- 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
+++ 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
@@ -890,13 +890,17 @@ namespace HypervResource
             VirtualSystemMigrationSettingData migrationSettingData = 
VirtualSystemMigrationSettingData.CreateInstance();
             VirtualSystemMigrationService service = 
GetVirtualisationSystemMigrationService();
 
+            IPAddress addr = IPAddress.Parse(destination);
+            IPHostEntry entry = Dns.GetHostEntry(addr);
+            string[] destinationHost = new string[] { destination };
+
             migrationSettingData.LateBoundObject["MigrationType"] = 
MigrationType.VirtualSystem;
             migrationSettingData.LateBoundObject["TransportType"] = 
TransportType.TCP;
+            migrationSettingData.LateBoundObject["DestinationIPAddressList"] = 
destinationHost;
             string migrationSettings = 
migrationSettingData.LateBoundObject.GetText(System.Management.TextFormat.CimDtd20);
 
             ManagementPath jobPath;
-            string destinationHost = "band-cloud153.blr.cloudstack.org";
-            var ret_val = service.MigrateVirtualSystemToHost(vm.Path, 
destinationHost, migrationSettings, null, null, out jobPath);
+            var ret_val = service.MigrateVirtualSystemToHost(vm.Path, 
entry.HostName, migrationSettings, null, null, out jobPath);
             if (ret_val == ReturnCode.Started)
             {
                 MigrationJobCompleted(jobPath);

Reply via email to