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