PowerCLI

 View Only
  • 1.  Connect-VIServer Resource temporarily unavailable

    Posted Dec 12, 2019 11:11 AM

    Hi,

    I have strange problem. I can't connect to ESXi or vCenter using VMware.PowerCLI 11.5.0.14912921. We have ESX 6.7U3. It's working on 6.7U2.

    I use powershell in docker on Linux. I run it as:

    sudo docker run --rm -it -v /home/vmware/scripts:/tmp/scripts vmware/powerclicore

    PS /root> $PSVersionTable

    Name                           Value

    ----                           -----

    PSVersion                      6.2.3

    PSEdition                      Core

    GitCommitId                    6.2.3

    OS                             Linux 3.10.0-693.11.1.el7.x86_64 #1 SMP Fri Oct 27 05:39:05 EDT 2017

    Platform                       Unix

    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}

    PSRemotingProtocolVersion      2.3

    SerializationVersion           1.1.0.1

    WSManStackVersion              3.0

    PS /root>  Get-Module | select  ModuleType,name,version

    ModuleType Name                            Version

    ---------- ----                            -------

      Manifest Microsoft.PowerShell.Management 6.1.0.0

      Manifest Microsoft.PowerShell.Utility    6.1.0.0

        Script PSReadLine                      2.0.0

        Script VMware.Vim                      6.7.0.14898114

        Script VMware.VimAutomation.Cis.Core   11.5.0.14898113

        Script VMware.VimAutomation.Common     11.5.0.14898112

        Script VMware.VimAutomation.Core       11.5.0.14899560

        Script VMware.VimAutomation.Sdk        11.5.0.14898111

    And we got error: Resource temporarily unavailable

    PS /root> Connect-VIServer vCenter2.XXXX -Verbose

    Specify Credential

    Please specify server credential

    User: YYYYY

    Password for user YYYYY: *************

    VERBOSE: Resource temporarily unavailable

    Connect-VIServer : 12/12/2019 11:06:09  Connect-VIServer                Resource temporarily unavailable

    At line:1 char:1

    + Connect-VIServer vCenter2.XXXX -Verbose

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Connect-VIServer], ViError

    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_SoapException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

    Anyone have any idea what's wrong?

    Best regards,

    majherek



  • 2.  RE: Connect-VIServer Resource temporarily unavailable

    Posted Dec 12, 2019 11:27 AM

    Did you already try increasing or disabling the WebOperationTimeoutSeconds with Set-PowerCLIConfiguration?


    Is that VCSA a VM?
    Anything like a backup job running at the time of the error?.

    Also, have a look inside the vpxd log

    There might be some additional clues in there.



  • 3.  RE: Connect-VIServer Resource temporarily unavailable

    Posted Dec 12, 2019 11:52 AM

    I don't think it is WebOperationTimeoutSeconds or anything like this. The error appears in less then 300 sec...

    VCSA is a VM.

    On other computer (win10) we do not have problem like this:

    PS C:\WINDOWS\system32> get-module

    ModuleType Version    Name                                ExportedCommands

    ---------- -------    ----                                ----------------

    Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...

    Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}

    Binary     1.0.0.1    PackageManagement                   {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...

    Script     1.0.0.1    PowerShellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...

    Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...

    PS C:\WINDOWS\system32> Connect-ViServer vcenter2.YYYY

    Name                           Port  User

    ----                           ----  ----

    vcenter2.YYY                   443   AAAAAAAAAAA

    PS C:\WINDOWS\system32>

    PS C:\WINDOWS\system32> $PSVersionTable

    Name                           Value

    ----                           -----

    PSVersion                      5.1.18362.145

    PSEdition                      Desktop

    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}

    BuildVersion                   10.0.18362.145

    CLRVersion                     4.0.30319.42000

    WSManStackVersion              3.0

    PSRemotingProtocolVersion      2.3

    SerializationVersion           1.1.0.1

    PS C:\WINDOWS\system32> get-module | select name,version

    Name                            Version

    ----                            -------

    Microsoft.PowerShell.Management 3.1.0.0

    Microsoft.PowerShell.Security   3.0.0.0

    Microsoft.PowerShell.Utility    3.1.0.0

    Microsoft.WSMan.Management      3.0.0.0

    PackageManagement               1.0.0.1

    PowerShellGet                   1.0.0.1

    PSReadline                      2.0.0

    VMware.Vim                      6.7.0.14898114

    VMware.VimAutomation.Cis.Core   11.5.0.14898113

    VMware.VimAutomation.Common     11.5.0.14898112

    VMware.VimAutomation.Core       11.5.0.14899560

    VMware.VimAutomation.Sdk        11.5.0.14898111



  • 4.  RE: Connect-VIServer Resource temporarily unavailable

    Posted Dec 12, 2019 12:10 PM

    From your info it looks then as if it something in the Linux OS or the container.

    Btw, you can also install PSv6 on a Windows box (side-by-side with PSv5.1), just to make sure it is not a PSv6 thing.



  • 5.  RE: Connect-VIServer Resource temporarily unavailable

    Posted Dec 12, 2019 12:19 PM

    After 2 month I find the problem.

    It was docker network (bridge). We have bond0 on linux and we add some time age vCenter VLAN into this bond0 (bond0.VLANID). Running docker in default network mode (bridged) it doesn't work. When I add --net=host it start to work again.

    When you have right: it something in the Linux OS or the container.

    Thanks for help.

    BR,

    majherek