When trying to run the above PowerCLI command we are receiving intermittent timeouts after100 seconds.
Does anyone know how to increase the timeout? We have a relatively large inventory of 5000 VMs which I think may be the cause.
e.g.
Exception calling "VirtualMachine_List" with "2" argument(s): "The request channel timed out while waiting for a reply after 00:01:39.9989887. Increase the
timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of
a longer timeout."
At C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:526 char:3
Describe the bug
When trying to run the above PowerCLI command we are receiving intermittent timeouts after100 seconds.
Does anyone know how to increase the timeout? We have a relatively large inventory of 5000 VMs which I think may be the cause.
e.g.
Exception calling "VirtualMachine_List" with "2" argument(s): "The request channel timed out while waiting for a reply after 00:01:39.9989887. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout." At C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:526 char:3
Add-HVDesktop : Failed to get any Virtual Center machines with the given machines parameter At line:1 char:5
Lines 522-537;
function Get-MachinesByVCenter ($MachineList,$VcId) {
[VMware.Hv.MachineId[]]$machines = $null $virtualMachine_helper = New-Object VMware.Hv.VirtualMachineService $vcMachines = $virtualMachine_helper.VirtualMachine_List($services,$vcId) $machineDict = @{} foreach ($vMachine in $vcMachines) { $machineDict.Add($vMachine.name,$vMachine.id) } foreach ($machineName in $machineList) { if ($machineDict.Contains($machineName)) { $machines += $machineDict.$machineName } } return $machines }
Reproduction steps
Expected behavior
VM added to Horizon Pool
Additional context
No response