After upgrading to vCenter 8, the New-VM PowerCLI command times out after 5 minutes with the message below:
Severity : Error
TargetSite :
Message : New-VM A task was canceled.
Data : {[ParameterValues, VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.CmdletParametersDictionary]}
InnerException : System.Threading.Tasks.TaskCanceledException: A task was canceled.
vSphere 8.x
Set timeout to infinite, then set back to a specific timeout period:
Set-PowerCLIConfiguration -WebOperationTimeoutSeconds -1
Now configure the timeout to a set time above 5 minutes:
Set-PowerCLIConfiguration -WebOperationTimeoutSeconds 600
The above command sets the timeout to 10 minutes. Now the New-VM command should not timeout after 5 minutes.