VMware Cloud Community
krowczynski1980
Enthusiast
Enthusiast

Cannot remove protection

Hello all,

unfortunately a VM was removed from Cluster before the protection of SRM was removed.

Now the VM has the status "Invalid: Protected VM deleted".

Any ideas or hints how this one can be removed?

Thanks for some help here.

Reply
0 Kudos
10 Replies
Sreejesh_D
Virtuoso
Virtuoso

Hi,

Please go through the following KB. Hope it will resolve the problem.

To resolve this issue:

  1. Manually identify and remove the managedBy tag from the virtual machines using the Power CLI script
  2. Perform a manual cleanup of the incorrect entries in the vCenter Server database.

VMs are reported as managed by Site Recovery Manager (2032366) | VMware KB

LittleCrow
Contributor
Contributor

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.

Reply
0 Kudos
jameseydoyle
VMware Employee
VMware Employee

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.

Reply
0 Kudos
rshenoy
Enthusiast
Enthusiast

Hi,

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.

Reply
0 Kudos
LittleCrow
Contributor
Contributor

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.

Reply
0 Kudos
JsikesAW
Contributor
Contributor

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.

Reply
0 Kudos
Jitu211003
Hot Shot
Hot Shot

Hi,

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 .

Reply
0 Kudos
wreedMH
Hot Shot
Hot Shot

Is there a way to force delete a protection group or site pair?

My remove/delete VM from SRM is greyed out.

Reply
0 Kudos
MartinDC
Contributor
Contributor

The only way i've found is selecting 2 VMs, the one with the error and another one with normal status. Then, the "Remove Protection" button becomes available. Once the protection is removed, and the placeholder VMs deleted, is necessary to protect the second VM again.

WDeignan
Contributor
Contributor

Thank you for that hint! It worked perfectly. I was not looking forward to mucking about in the database.

Tags (1)
Reply
0 Kudos