Repository: cloudstack Updated Branches: refs/heads/4.4 9bc19bc24 -> 6dacfa9ef
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/6dacfa9e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6dacfa9e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6dacfa9e Branch: refs/heads/4.4 Commit: 6dacfa9efd46ddfa63e944401596c72125c6ec0f Parents: 9bc19bc Author: Anshul Gangwar <anshul.gang...@citrix.com> Authored: Wed Apr 2 01:29:28 2014 -0700 Committer: Devdeep Singh <devd...@gmail.com> Committed: Tue Apr 8 14:58:02 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/6dacfa9e/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); } }