Fixed issues on HyperV Agent code for  shared network VR issues

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

Branch: refs/heads/master
Commit: 1d3a4f46454c1d5c3726206e3f0a57773e05645f
Parents: 4a61e92
Author: Rajesh Battala <[email protected]>
Authored: Mon Dec 2 18:03:59 2013 +0530
Committer: Rajesh Battala <[email protected]>
Committed: Tue Dec 3 12:17:32 2013 +0530

----------------------------------------------------------------------
 .../DotNet/ServerResource/HypervResource/WmiCallsV2.cs    | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1d3a4f46/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 ca49bd9..e2d4f6c 100644
--- 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
+++ 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
@@ -431,7 +431,15 @@ namespace HypervResource
                 System.Threading.Thread.Sleep(90000);
                 SetState(newVm, RequiredState.Reset);
                 // wait for the second boot and then return with sucesss
-                pingResource(publicIpAddress);
+                //if publicIPAddress is empty or null don't ping the ip
+                if (publicIpAddress.Equals("") == true)
+                {
+                    System.Threading.Thread.Sleep(90000);
+                }
+                else
+                {
+                    pingResource(publicIpAddress);
+                }
             }
             logger.InfoFormat("Started VM {0}", vmName);
             return newVm;

Reply via email to