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/20 12:42:31 UTC
git commit: updated refs/heads/master to 74cb4b1
Updated Branches:
refs/heads/master 0182a1879 -> 74cb4b1c5
CLOUDSTACK-5555: Fixing booting a vm on hyperv with data disk. Made
changes to attach a data disk on scsi controller when a vm is being
created.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/74cb4b1c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/74cb4b1c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/74cb4b1c
Branch: refs/heads/master
Commit: 74cb4b1c5ae0ff9f93387b30111301307779f24d
Parents: 0182a18
Author: Devdeep Singh <de...@gmail.com>
Authored: Sat Dec 21 00:11:11 2013 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Fri Dec 20 17:12:59 2013 +0530
----------------------------------------------------------------------
.../ServerResource/HypervResource/WmiCallsV2.cs | 23 ++++++++++++++------
1 file changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/74cb4b1c/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 b7ae665..2248afa 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
@@ -339,7 +339,6 @@ namespace HypervResource
}
string driveType = diskDrive.type;
-
string ideCtrllr = "0";
string driveResourceType = null;
switch (driveType) {
@@ -351,6 +350,8 @@ namespace HypervResource
ideCtrllr = "1";
driveResourceType = ISO_DRIVE;
break;
+ case "DATADISK":
+ break;
default:
// TODO: double check exception type
errMsg = string.Format("Unknown disk type {0} for disk {1}, vm named {2}",
@@ -360,12 +361,20 @@ namespace HypervResource
logger.Error(errMsg, ex);
throw ex;
}
- logger.DebugFormat("Create disk type {1} (Named: {0}), on vm {2} {3}", diskName, driveResourceType, vmName,
- string.IsNullOrEmpty(vhdFile) ? " no disk to insert" : ", inserting disk" +vhdFile );
- AddDiskDriveToIdeController(newVm, vhdFile, ideCtrllr, driveResourceType);
- if (isoPath != null)
+
+ logger.DebugFormat("Create disk type {1} (Named: {0}), on vm {2} {3}", diskName, driveResourceType, vmName,
+ string.IsNullOrEmpty(vhdFile) ? " no disk to insert" : ", inserting disk" + vhdFile);
+ if (driveType.Equals("DATADISK"))
+ {
+ AttachDisk(vmName, vhdFile, (string)diskDrive.diskSeq);
+ }
+ else
{
- AttachIso(vmName, isoPath);
+ AddDiskDriveToIdeController(newVm, vhdFile, ideCtrllr, driveResourceType);
+ if (isoPath != null)
+ {
+ AttachIso(vmName, isoPath);
+ }
}
}
@@ -488,7 +497,7 @@ namespace HypervResource
PingReply pingReply = null;
IPAddress ipAddress = null;
Ping pingSender = new Ping();
- int numberOfPings = 4;
+ int numberOfPings = 6;
int pingTimeout = 1000;
int byteSize = 32;
byte[] buffer = new byte[byteSize];