Please go through the following KB. Hope it will resolve the problem.
To resolve this issue:
-SD [vExpert 14-20, VCIX6-NV&DCV,RHCE,AWS-SAA]1 person found this helpful
- Manually identify and remove the managedBy tag from the virtual machines using the Power CLI script
- Perform a manual cleanup of the incorrect entries in the vCenter Server database.
We have the same issue. However, the KB linked doesn't apply as we're running SRM 6.5 using the bundled postgres DB.
I've not been able to find a document that applies, so barring a call to VMWare the only option is to delete the protection group and recreate it.
#### Edit ####
Just tried removing the Protection group and can't, get the error 'Cannot remove a protection group with protected VMs'
Also changed the Datastore Group assigned to the protection group - The deleted VM still stays in the Protection group, despite never having been on the Datastore now protected.
Looks like a call to get the equivalent Postgres commands is needed.
I'm afraid a call to VMware is probably the best thing to do in this situation. There will be reference to this deleted VM in the SRM DB in the pdh_protectedvm, pdr_protectedvm or pdr_protectedvmpeer tables and other references in other DB tables that will need to be cleaned up. Make sure that you take a full backup of the DB before you do anything though.
I would suggest to unprotect the remaining virtual machines that are currently residing on the impacted protection group making it only the stale VM placed on the PG. The only way to clean it up would be by removing the VM entries from the SRM DB (we have 8 such tables which holds the references to this VM. If you have a large VM inventory protected under SRM then easiest way would be to remove the protection group itself from SRM DB on both the sites.
We just updated to vSphere 6.5U1 and SRM 6.5.1 - it looks like this can now be done through the GUI without having to resort to editing Database tables, etc.
Just a follow up question to this.. Is it possible to perform the deletion of Invalid (due to deletion) VMs inside of protection group using PowerCLI? Since we've moved to a CI/CD model the manual cleanup of deleted VMs is painful thru the GUI. I've worked with Ben Meadowcroft's SRM PowerCLI cmdlets but it doesn't seem to allow protection removal on deleted/invalid VMs.
Here in my scenario, we face same kind of issue wherein VMs is decommissioned from the Vcenter but not from the SRM console.
Later we used to remove the protection from the SRM console for those VMs clears the error in SRM Console.
Just right click on those VMs under protection group and select remove/delete .
Is there a way to force delete a protection group or site pair?
My remove/delete VM from SRM is greyed out.