VMware Cloud Community
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Power On SRM Protected VM

Hi,

I am trying to test the SRM protected VM on DR site. Where I can power on recovered VMs in the DR using GUI.

But When I tried to powered on the recovered VM in DR site using CLI, it gives me the below error. Please help

Script

foreach($serv in (Get-Content -Path ".\Test_VMs.txt")){
$vm = Get-VM -Name $serv
Start-VM -VM $vm -Confirm:$false | format-table –AutoSize
}

 

Error

Start-VM : 7/12/2023 12:32:41 AM Start-VM The method is disabled by 'com.vmware.vcDr'
At D:\2023\1_DR_Test_Power_On\1_DR_Test_Power_On.ps1:4 char:1
+ Start-VM -VM $vm -Confirm:$false | format-table –AutoSize
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VM], MethodDisabled
+ FullyQualifiedErrorId : Client20_VMServiceImpl_StartVM_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.StartVM

 

0 Kudos
1 Solution

Accepted Solutions
VandréLM
Contributor
Contributor
Jump to solution

Hello,

Are you trying to power on a placeholder VM? the placeholder VMs are managed by SRM.

It can be done by SRM running a test or a recovery plan.

You can power on by your user with CLI only your protected VMs.

you can get more informations here: https://docs.vmware.com/en/Site-Recovery-Manager/8.7/com.vmware.srm.admin.doc/GUID-EFE73B20-1C68-4D2...

 

View solution in original post

0 Kudos
5 Replies
VandréLM
Contributor
Contributor
Jump to solution

Hello,

Are you trying to power on a placeholder VM? the placeholder VMs are managed by SRM.

It can be done by SRM running a test or a recovery plan.

You can power on by your user with CLI only your protected VMs.

you can get more informations here: https://docs.vmware.com/en/Site-Recovery-Manager/8.7/com.vmware.srm.admin.doc/GUID-EFE73B20-1C68-4D2...

 

0 Kudos
pashnal
Enthusiast
Enthusiast
Jump to solution

Hi @ganapa2000 

You cannot power on a protected VM(PlaceHolder VM) in the DR as its a dummy VM without any HDD attached to it . During a DR SRM will run Recovery Plans and Power them on . 

If you want to test , Then as mentioned in the thread , Please run a Test DR where SRM will power on the DR VMs in a dummy network without impacting the production workload . 

Thanks 

Pramod Ashnal  

0 Kudos
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Hi,

Thank you for your input, I did a test recovery of one of the recovery group and tested powering on VMs through CLI, initially it didnt work then again I have cleanup the test recovery and did the test recovery. this time it worked. not sure why I was not able to power on recovered VM.

Anyway thanks for your input.

 

0 Kudos
VandréLM
Contributor
Contributor
Jump to solution

Hello,

In fact to run the recover test powering on the shadow VM you must develop your script to execute as the SRM not as the vSphere Client user.

You can get some examples here:

https://github.com/vmware/PowerCLI-Example-Scripts/tree/master/Modules/SRM

I hope it will be useful for you.

If you like my advice, do not forget to give a Kudos 🙂

Thanks,

0 Kudos
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Hi,

Thanks for your reply. I tried the below mentioned link previously. that doesnt seem to work on latest version of SRM 8.x with latest version of PowerCLI 13.x

https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-Recovery-Plan-Name-from-MoRef/m-p/...

ganapa2000_0-1689173012057.png

 

 

0 Kudos