SdnExpress: If NC VM Creation fails then the error is swallowed and SDNExpress goes in Infinite loop
perfycat opened this issue · 1 comments
We have a case where the one of the NC VMs vailed to be created due to some other configuration issue. When this happens the exception is swallowed:
VERBOSE: [20190918-18:23:45] Creating VM: TK5-3WP14R1705
New-VM : The operation on computer 'TK5-3WP14R1705' failed: WinRM cannot process the request. The following error
occurred while using Kerberos authentication: Cannot find the computer TK5-3WP14R1705.local. Verify that the computer
exists on the network and that the name provided is spelled correctly.
At C:\E2EWorkload\SdnExpress\scripts2\SDNExpressModule.psm1:2111 char:14
- ... $NewVM = New-VM -ComputerName $computername -Generation 2 -Name $V
After this occurs SdnExpress continues to run, then goes in a loop waiting for the VM to start that was never created:
VERBOSE: [20190919-09:20:49] S116-NC-03 is not active, sleeping for 10 seconds.
VERBOSE: [20190919-09:20:59] Attempting to contact S116-NC-03.
VERBOSE: [20190919-09:21:20] S116-NC-03 is not active, sleeping for 10 seconds.
VERBOSE: [20190919-09:21:30] Attempting to contact S116-NC-03.
In last update, added timeout to the active VM check and also an exception handler for the VM creation.