You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ta...@apache.org on 2014/04/08 14:26:11 UTC

[56/60] [abbrv] git commit: updated refs/heads/marvin to 0e223d6

CLOUDSTACK-6289: fixed storage migration failing in case of hyper-v if there are multiple disks attached to VM


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

Branch: refs/heads/marvin
Commit: 1dfe4c19b5b1caa7edfdd28d0f76afff7ae7247b
Parents: e644ac1
Author: Anshul Gangwar <an...@citrix.com>
Authored: Wed Apr 2 01:29:28 2014 -0700
Committer: Devdeep Singh <de...@gmail.com>
Committed: Tue Apr 8 14:39:13 2014 +0530

----------------------------------------------------------------------
 .../hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1dfe4c19/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 ff8ab90..c8be008 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
@@ -1099,8 +1099,7 @@ namespace HypervResource
             string[] rasds = null;
             if (sasd != null)
             {
-                rasds = new string[sasd.Length];
-                uint index = 0;
+                rasds = new string[1];
                 foreach (StorageAllocationSettingData item in sasd)
                 {
                     string vhdFileName = Path.GetFileNameWithoutExtension(item.HostResource[0]);
@@ -1109,9 +1108,9 @@ namespace HypervResource
                         string newVhdPath = Path.Combine(destination, Path.GetFileName(item.HostResource[0]));
                         item.LateBoundObject["HostResource"] = new string[] { newVhdPath };
                         item.LateBoundObject["PoolId"] = "";
+                        rasds[0] = item.LateBoundObject.GetText(System.Management.TextFormat.CimDtd20);
+                        break;
                     }
-
-                    rasds[index++] = item.LateBoundObject.GetText(System.Management.TextFormat.CimDtd20);
                 }
             }