You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2013/12/04 06:14:05 UTC
[4/4] git commit: updated refs/heads/master to d26b9ac
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/d26b9ac0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d26b9ac0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d26b9ac0
Branch: refs/heads/master
Commit: d26b9ac00e1486dd7ec68e6f2ef03777f007a344
Parents: 5a96307
Author: Devdeep Singh <de...@gmail.com>
Authored: Wed Dec 4 02:27:27 2013 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Wed Dec 4 10:31:02 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/d26b9ac0/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/d26b9ac0/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);