7 Replies Latest reply on Jun 11, 2019 7:24 AM by LucD

    srm 8.2 (appliance) and vcenter 6.7u2a (appliance) can't connect with powercli 11.2 from windows

    nkarandikar Lurker

      from a windows server (2012r2) in the same env. as both vcenter and srm I have connected to vcenter with powercli (no issues there)

      but when i try connect-srmserver, i get errors, i have tried various combinations of the command with srm server IP and usernames and passwords trying to follow the command reference here Online Documentation - Cmdlet Reference - VMware {code}  and 11.2 users guide https://vdc-download.vmware.com/vmwb-repository/dcr-public/72479a44-60ed-4b00-839a-0e442d85a863/6a9f9b49-367a-4ece-b543-… .
      i have an older env. (vcenter and srm 6.5 on windows and this works without issues, so i have an idea of how the commands work, the end goal is to load up the api)

       

       

      PS C:\> Connect-SrmServer

      Connect-SrmServer : 6/10/2019 4:53:27 PM        Connect-SrmServer               Unable to connect to the remote server

      At line:1 char:1

      + Connect-SrmServer

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

          + CategoryInfo          : NotSpecified: (:) [Connect-SrmServer], VimException

          + FullyQualifiedErrorId : ConnectServer_UnhandledException,VMware.VimAutomation.Srm.Commands.Commands.ConnectSrmSe

         rver


      or if i do

       

      PS C:\> Connect-SrmServer -srmserver <IP or fqdn>
      when i do this i get a prompt for creds (i enter my creds that i use for vcenter {windows domain creds})

      and i get this

      Connect-SrmServer : Unable to connect to the remote server

      At line:1 char:1

      + Connect-SrmServer -srmserveraddress 10.193.198.142

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

          + CategoryInfo          : NotSpecified: (:) [Connect-SrmServer], VimException

          + FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.VimException,VMware.VimAuto

         mation.Srm.Commands.Commands.ConnectSrmServer

       

       

      there is no firewall between windows or the 2 appliances

        • 1. Re: srm 8.2 (appliance) and vcenter 6.7u2a (appliance) can't connect with powercli 11.2 from windows
          LucD Guru
          Community WarriorsUser ModeratorsvExpert

          Are you sure you can use the same credentials as for the VCSA?
          You did do the Connect-VIServer to the VCSA first?
          Can you open the SRM plugin in the Web Client when connected to the VCSA?

          • 2. Re: srm 8.2 (appliance) and vcenter 6.7u2a (appliance) can't connect with powercli 11.2 from windows
            nkarandikar Lurker

            note the above does not prompt me for creds

             

            same creds for vcsa?
            in VCSA i have configured Identity sources to point to my windows domain, my ID is full admin everywhere, no fw blocking
            srm plugin is fully connected to/in both sites (SRM 8.2 and replication 8.2)
            DNS is all good

             

             

             

            new env. so i only have 1 Vm replicating,, but in the web plugin i can test failover, modify all settings etc., that all looks good

             

             

            from what i have read/understand just connect-srm server should work, but even when i try adding in the srm appliance IP

            note this variation asks me for creds, i have tried my windows ID, and the vcsa and srm local internal IDs (root),

            and this error is slightly different from above

            • 3. Re: srm 8.2 (appliance) and vcenter 6.7u2a (appliance) can't connect with powercli 11.2 from windows
              LucD Guru
              Community WarriorsUser ModeratorsvExpert

              Did you already try with (after the Connect-VIServer)?


              Connect-SrmServer -NotDefault -IgnoreCertificateErrors

               

              See also Example 4 on the Connect-SrmServer cmdlet.

              You could also try adding the Verbose switch.

              • 4. Re: srm 8.2 (appliance) and vcenter 6.7u2a (appliance) can't connect with powercli 11.2 from windows
                nkarandikar Lurker

                yup tried that

                 

                and this error is occurring at both sites vcenters/srm, 2 separate windows servers that i am running the ps command from
                one in each site, get same results to each individual vcenter/srm

                 

                 

                 

                anything else to try?

                 

                installed versions of what i have

                 

                vcenter 6.7u2a appliance(both sites)

                 

                srm 8.2 (appliance) both sites (replication 8.2 as well both sites)

                 

                 

                 

                windows 2012r2 (fully up to date)

                 

                 

                PS C:\> $PSVersionTable

                Name                           Value

                ----                           -----

                PSVersion                      5.1.14409.1018

                PSEdition                      Desktop

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

                BuildVersion                   10.0.14409.1018

                CLRVersion                     4.0.30319.42000

                WSManStackVersion              3.0

                PSRemotingProtocolVersion      2.3

                SerializationVersion           1.1.0.1

                 

                 

                 

                 

                PS C:\> get-powercliversion

                WARNING: The cmdlet "Get-PowerCLIVersion" is deprecated. Please use the 'Get-Module' cmdlet instead.

                PowerCLI Version

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

                   VMware PowerCLI 11.2.0 build 12483598

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

                Component Versions

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

                   VMware Cis Core PowerCLI Component PowerCLI Component 11.2 build 12483642

                   VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 11.2 build 12483638

                   VMware VimAutomation Srm PowerCLI Component PowerCLI Component 11.2 build 12483605

                 

                 

                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...}

                Script     6.7.0.1... VMware.Vim

                Script     11.2.0.... VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}

                Script     11.2.0.... VMware.VimAutomation.Common

                Script     11.2.0.... VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAd...

                Script     11.2.0.... VMware.VimAutomation.Sdk            {Get-ErrorReport, Get-InstallPath, Get-PSVersion}

                Script     11.2.0.... VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}

                • 5. Re: srm 8.2 (appliance) and vcenter 6.7u2a (appliance) can't connect with powercli 11.2 from windows
                  LucD Guru
                  vExpertUser ModeratorsCommunity Warriors

                  Not at this time I'm afraid.
                  You might want to open a SR for this.

                  • 6. Re: srm 8.2 (appliance) and vcenter 6.7u2a (appliance) can't connect with powercli 11.2 from windows
                    nkarandikar Lurker

                    I had submitted a comment/feedback from inside the SRM plugin last week (and had not heard back) until late last night from vmware
                    This is the "fix" (which i have confirmed as working in both sites)

                     

                    “connect-srmserver -Port 443”

                     

                    The reason is there is a change in the port used with the SRM appliance.

                     


                    my install is default install (not sure what port it was trying)