VMware Cloud Community
Pankaj85
Enthusiast
Enthusiast

Connect-SrmServer not able to work with SRM server in shared recovery mode

Hi,

I have installed SRM version 5.5.1 1647061 in shared recovery mode (ran setup with /v:”CUSTOM_SETUP=1”) option. vCenter version 5.5.0 1891313

PS C:\Windows\system32> $SrmConnection.Version

5.5.1

5.5.1

PS C:\Windows\system32> $SrmConnection.Build

1647061

I am trying to connect to SRM server using “connect-srm” command but gets below error:

PS C:\Windows\system32> $SrmConnection = Connect-SrmServer

Connect-SrmServer : 7/21/2014 11:49:51 AM    Connect-SrmServer        No SRM servers linked to the vSphere server inggnvc1srv were found.   

At line:1 char:18

+ $SrmConnection = Connect-SrmServer

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

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

    + FullyQualifiedErrorId : ViCoreImpl_Srm_RelatedSrmServiceImpl_ConnectSrmServers_NoLinkedSrmServerFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.Srm.ConnectSrmS

   erver

but when I specify the SRM server address manually it is able to connect and do the basic operations such as list protection groups, recovery plans etc

$SrmConnection = Connect-SrmServer srmserver -Credential $cred

Issue is when I run the “UpdateViewData” method on VM’s inside Protection goup it gives below error

$SrmApi.Protection.ListProtectionGroups()[0].listprotectedvms()[0].vm.updateviewdata()

Exception calling "UpdateViewData" with "0" argument(s): "The current operation requires the SrmViews component to determine the VC connection corresponding to SRM

connection 'inpunsrm1srv:9007'. Currently there is no connection to the VC corresponding to the specified SRM."

At line:1 char:1

+ $SrmApi.Protection.ListProtectionGroups()[0].listprotectedvms()[0].vm.updateview ...

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

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : ApplicationException

I checked that SRM is registered as extension to both the vCenters

extensionList["com.vmware.vcDr-SRM01"]Extension

Does anyone able to work with shared recovery sites using PowerCLI 5.5 Release 2 Patch 1 build 1931983?

Tags (2)
Reply
0 Kudos
2 Replies
Pankaj85
Enthusiast
Enthusiast

After lot of trail and errors, I come to conclusion that this SRM cmdlets do not work with custom SRM setup (Shared recovery site). I re-installed SRM with default and everything is working fine.

Pankaj

ikiris
Enthusiast
Enthusiast

I know this is an old thread, but I was laboring over the same issue and found a workaround.

The updateviewdata won't work directly on the protectedvm.vm object, but you can do a get-view -id protectedvm.vm.moref

EX:

$pvms = $SrmApi.Protection.ListProtectionGroups().listprotectedvms()

$pvms | % {

$_.VM = get-view -id $_.vm.moref

}

I wrote a blog post for a little more info:

Using PowerCLI with Site Recovery Manager Shared Recovery Site | Virtual Chris

-Chris- http://www.twitter.com/ikiris http://blog.chrischua.net
Reply
0 Kudos