if i use the command sequence:
$objTask = New-VM -Name $hostname -ResourcePool $objCluster -ContentLibraryItem $objContentLibrary -Location $objFolder -Datastore $objDatastoreCluster -RunAsync
write-host "Deploy OVF Template: Starting Job..."
Wait-Task $objTask
After some time the error is returned:
Wait-Task : 19/06/2017 14:05:49 Wait-Task 19/06/2017 13:54:45 Wait-Task The operation has timed out
At line:1 char:1
+ Wait-Task $objTask
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Wait-Task], ViError
+ FullyQualifiedErrorId : VICore_VMServiceImpl_DeployFromLibraryItem_Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.WaitTask
Even giving this error I realized that in vcenter there are still two tasks: Deploy OVF package from Content Library and then the Deploy OVF template
This two tasks are executed with sucess and vm was created even with the timeout error.
Note: The template has 25GB
Did you already try changing the WebOperationsTimeoutSeconds with the Set-PowerCLIConfiguration cmdlet?
Mind the Scope!
Not sure if the Wait-Task uses this timeout though.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you already try changing the WebOperationsTimeoutSeconds with the Set-PowerCLIConfiguration cmdlet?
Mind the Scope!
Not sure if the Wait-Task uses this timeout though.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference