Since the VMs in the recovery plan and protection group were manually recovered, it was needed to delete and recreate the protection group and recovery plan.
But unable to delete the recovery plan as the delete button is greyed out in Site Recovery UI and the following error is seen when navigating to the Virtual Machine tab of the Recovery Plan:
"Unable to get property 'vmRecoveryStatus.length' for MoRefData: type = DrRecoveryRecoveryPlan, value = ########-####-####-####-############, serverGuid = ########-####-####-####-############. Operation ID: ########-####-####-####-############".VMware Live Site Recovery 9.0.2
Since the VMs was recovered manually outside of VMware Live Site Recovery(VLSR), the VLSR DB (database) would be out of sync with the VM's current state in the recovery plan.
The VLSR appliance will also be unable to query information related to the recovery of the VM, as the VM's state is not as expected by the recovery workflow.
And since it is unable to query this information, the delete option would also not be available.
Since out-of-band recovery was performed for VMs in a recovery plan, the recovery plan must be deleted and re-created. If the delete option is greyed out in the UI, then the recovery plan must be deleted directly from the database.
Below are the steps:
Take snapshot of both production and recovery site VLSR appliances.
Identify the name of the protected VM, recovery plan and protection group either from the UI or by running the following query in an SSH to the VLSR appliance. Need to run this on both the appliances:
python /opt/vmware/srm/dbtool/SrmDbTool.py query RecoveryPlan
python /opt/vmware/srm/dbtool/SrmDbTool.py query ProtectionGroup
python /opt/vmware/srm/dbtool/SrmDbTool.py query ProtectedVm
Stop the srm-server service on both appliances using the command: systemctl stop srm-server
Run the following command to delete the protection group and recovery plan. There were no protected VMs:
python /opt/vmware/srm/dbtool/SrmDbTool.py delete RecoveryPlan <recovery_plan_name>
python /opt/vmware/srm/dbtool/SrmDbTool.py delete ProtectionGroup <protection_group_name>
Start srm-server service on both the appliances using the command: systemctl start srm-server
Restart dr-client service on the appliance serving the Site Recovery page.
Post this the recovery plan and protection group would be deleted.
Re-create the protection group and recovery plan as needed.