diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs index ca49bd90c90..e2d4f6c4b91 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;