Fixed issues on HyperV Agent code for shared network VR issues

This commit is contained in:
Rajesh Battala 2013-12-02 18:03:59 +05:30
parent 8581e58165
commit 99e65d051d
1 changed files with 9 additions and 1 deletions

View File

@ -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;