Skip to content

Remove Stale SRM Entries from PSC

Step 1. Find out from vCenter where is my PSC
/usr/lib/vmware-vmafd/bin/vmafd-cli get-ls-location --server-name localhost

C:\Program Files\VMware\vCenter Server\vmafdd\vmafd-cli get-site-name --server-name localhost

/usr/lib/vmidentity/tools/scripts/lstool.py list --url http://localhost:7080/lookupservice/sdk > /tmp/psc_services.txt

grep -i vrms -A1 -B2 psc_services.txt
grep -i h5-dr -A1 -B2 psc_services.txt
grep -i vrUi -A1 -B2 psc_services.txt
grep -i vcdr -A1 -B2 psc_services.txt
grep -i vrms -A1 -B2 psc_services.txt
Step 2. 
/usr/lib/vmidentity/tools/scripts/lstool.py list --url http://localhost:7080/lookupservice/sdk --type VCDR

 "%VMWARE_PYTHON_BIN%" "%VMWARE_CIS_HOME%\VMware Identity Services\lstool\scripts\lstool.py" list --url http://localhost:7080/lookupservice/sdk --type VCDR

Output to a text log if you prefer

/usr/lib/vmidentity/tools/scripts/lstool.py list --url http://localhost:7080/lookupservice/sdk --type VCDR > VRPSC.txt

"%VMWARE_PYTHON_BIN%" "%VMWARE_CIS_HOME%\VMware Identity Services\lstool\scripts\lstool.py" list --url http://localhost:7080/lookupservice/sdk type VCDR  > c:\psc_services.txt 

Output should look like this.

Name: vCenter DR service (vCenter-dr)        Service Product: com.vmware.dr        Service Type: vcDr        Service ID: 47a38601-09dc-4b24-8c60-c80c93a90e31        Site ID: site-1        Node ID: 80b10878-ffb4-11e7-aa05-000c298c82ea        Owner ID: SRM-47a38601-09dc-4b24-8c60-c80c93a90e31@vsphere.local        Version: 6.5.1        Endpoints:                Type: com.vmware.dr.extApi                Protocol: vmomi                URL: https://192.168.1.152:9086/vcdr/extapi/sdk                SSL trust: MIIDVTCCAj2gAwIBAgIJAOwNcvFh5SwWMA0GCSqGSIb3DQEBCwUAMF4xLTArBgNVBAoMJFZNd2FyZSB2Q2VudGVyIFNpdGUgUmVjb3ZlcnkgTWFuYWdlcjEtMCsGA1UECwwkVk13YXJlIHZDZW50ZXIgU2l0ZSBSZWNvdmVyeSBNYW5hZ2VyMB4XDTE4MDEyNDEyNTYyN1oXDTIzMDEyMzEyNTYyN1owNDEMMAoGA1UECgwDdm13MQwwCgYDVQQLDAN2bXcxFjAUBgNVBAMMDTE5Mi4xNjguMS4xNTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDH+4hV/uqF892kMaNvBY36Py/VTF7vNOV7QpuQhfOzMjW0JMbSxRKuOLvc8UggEXAmqOi26s0Z3ZlDIXeCtJ9sk4YM3TsNRnkGWcgwBUR9LpSOyKFbiy4/WLnPM+Iw7w2oluPpvfSVvl7lH760ivqOdJ/o3UPI26T3SGDWhT8wtD9jeW1vbMhEke8ERuU8Y9yEICA/JEqhezf9KGKT/e4P6ZEAT7KzUKJvmRu+0L8OsdENyfpwgo/6nxTslcnf1JJG+R7sEOd3iUpppLiq2TX8ofb0Oq/epoJfgw2pFxifNZBgdbYZQjURWLCuO5ryiEirI5fRCnU8y1Da9nmfDzxzAgMBAAGjQDA+MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEQQIMAaHBMCoAZgwDQYJKoZIhvcNAQELBQADggEBAC5p5zsiVmIiu1bzzmt4M+RiqJm0rS6NEjIIts6u8a/pfsnIE8iHTwmG6UDwIVK6CVI+zPa7Ido0KVUXekDk456PT+3xblj5m++M9WFu4Yc0WRW9e5Y1BubZoyfeLgZhk2egCz+xtAR1UZvqUMNrrGF0mrm5TxXw1vqwlU2kiauBMgtrb7w7qS7VBtFXYFGGbXtoTCA8EuiPqZuAZMXCqsBl0y2niORL+PPa96RlYwF+8WpDtyfKwezcu6YeSGhFeG36VRuoDclga5hCUFAPRY6YAlgK7qmXyYcM7mPuY/Wvkz7G+hWTAbiu3wG1adXeAf0hR7JIYungF/AVIBVwUms=                Type: com.vmware.dr.vcDr                Protocol: vmomi                URL: https://192.168.1.152:9086/vcdr/vmomi/sdk                SSL trust: MI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eG36VRuoDclga5hCUFAPRY6YAlgK7qmXyYcM7mPuY/Wvkz7G+hWTAbiu3wG1adXeAf0hR7JIYungF/AVIBVwUms=        Attributes:                supportedVmodlVersions: /vcdr/vmomi/drserviceversions.xml                vcInstanceUuid: 0275943f-0310-4db2-8af8-52a91886c61c                vmodlVersion: /vcdr/vmomi/drversion.xml                extensionKey: com.vmware.vcDr-------------------------------------------------------        Name: vCenter DR service (vCenter-dr)        Service Product: com.vmware.dr        Service Type: vcDr        Service ID: 19e3917f-7dd8-4c48-8fd0-403402a7a97d        Site ID: site-1        Node ID: faa9b94a-0018-11e8-8667-000c29d9d620        Owner ID: SRM-19e3917f-7dd8-4c48-8fd0-403402a7a97d@vsphere.local        Version: 6.5.1        Endpoints:                Type: com.vmware.dr.vcDr                Protocol: vmomi                URL: https://192.168.2.57:9086/vcdr/vmomi/sdk                SSL trust: MIIDVDCCAjygAwIBAgIJAIvOJ13CmKANMA0GCSqGSIb3DQEBCwUAMF4xLTArBgNVBAoMJFZNd2FyZSB2Q2VudGVyIFNpdGUgUmVjb3ZlcnkgTWFuYWdlcjEtMCsGA1UECwwkVk13YXJlIHZDZW50ZXIgU2l0ZSBSZWNvdmVyeSBNYW5hZ2VyMB4XDTE4MDEyNDEzNDkxNFoXDTIzMDEyMzEzNDkxNFowMzEMMAoGA1UECgwDdm13MQwwCgYDVQQLDAN2bXcxFTATBgNVBAMMDDE5Mi4xNjguMi41NzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANdjmw/13HAbeMvBguc9t9P3hmi3ijmw/GMnyz3tj7Jm/QoaBls94Tu0uhSb6bTeS3laPMx7cUAn35WP/KPtVrrv7fIwAtP4wBDXRhQ1YLbs8vLErVXaCgdHX/PLBSq8Qba7zkGFwUNTCncaeC7dSR8zYIBekLsWQ5N4BrVQwrgz+WdOKJfryt1uQw4ZSVt+bsq23FBbV42LtGmOpIe0h7ptfQ+j0YmqXJtap/BqBMHGny/P4Xbufv+yTexERqJXp6u4ub7PJzGgtVCaD07aTltWqsVAFJLOtBlx1jVwPOxzdI9OOtpueimWCphChFUgN3e2ML9PlVtXzHLuFOaB70ECAwEAAaNAMD4wCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0RBAgwBocEwKgCOTANBgkqhkiG9w0BAQsFAAOCAQEAQE8Wlco9B3q5znHxLnH5uvFptSYbsEftNUP6wC0CVQOiLOCVn9phO3EIDV3Su06IDN2UCWbxwYWmLeyKTqCiqbDLl+cwzaoenw5BE9yca0dLiwEhqa9KJ9SnH3LMX8bTNlNaXcYuHvh+WFLYRdud6zLqwrKMDXLI5E1AMMZpG0q0Fx+ALpiZ0xlJVSjRrVnMPdDw5NHwzPRPFybeE3jBhBumnajWRTBDKZBEcPSJ+o4DlMgadltXcEZO6/1yFwyb6p4yg2TKG3rKIP+6fv0etRN30EnVXtzJm3r+8953x5ED9R7H6No+XH1wS3l6hY81mQPE+yDrwxN45F13pXe0EQ==                Type: com.vmware.dr.extApi                Protocol: vmomi                URL: https://192.168.2.57:9086/vcdr/extapi/sdk                SSL trust: MIIDVDCCAjygAwIBAgIJAIvOJ13CmKANMA0GCSqGSIb3DQEBCwUAMF4xLTArBgNVBAoMJFZNd2FyZSB2Q2VudGVyIFNpdGUgUmVjb3ZlcnkgTWFuYWdlcjEtMCsGA1UECwwkVk13YXJlIHZDZW50ZXIgU2l0ZSBSZWNvdmVyeSBNYW5hZ2VyMB4XDTE4MDEyNDEzNDkxNFoXDTIzMDEyMzEzNDkxNFowMzEMMAoGA1UECgwDdm13MQwwCgYDVQQLDAN2bXcxFTATBgNVBAMMDDE5Mi4xNjguMi41NzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANdjmw/13HAbeMvBguc9t9P3hmi3ijmw/GMnyz3tj7Jm/QoaBls94Tu0uhSb6bTeS3laPMx7cUAn35WP/KPtVrrv7fIwAtP4wBDXRhQ1YLbs8vLErVXaCgdHX/PLBSq8Qba7zkGFwUNTCncaeC7dSR8zYIBekLsWQ5N4BrVQwrgz+WdOKJfryt1uQw4ZSVt+bsq23FBbV42LtGmOpIe0h7ptfQ+j0YmqXJtap/BqBMHGny/P4Xbufv+yTexERqJXp6u4ub7PJzGgtVCaD07aTltWqsVAFJLOtBlx1jVwPOxzdI9OOtpueimWCphChFUgN3e2ML9PlVtXzHLuFOaB70ECAwEAAaNAMD4wCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0RBAgwBocEwKgCOTANBgkqhkiG9w0BAQsFAAOCAQEAQE8Wlco9B3q5znHxLnH5uvFptSYbsEftNUP6wC0CVQOiLOCVn9phO3EIDV3Su06IDN2UCWbxwYWmLeyKTqCiqbDLl+cwzaoenw5BE9yca0dLiwEhqa9KJ9SnH3LMX8bTNlNaXcYuHvh+WFLYRdud6zLqwrKMDXLI5E1AMMZpG0q0Fx+ALpiZ0xlJVSjRrVnMPdDw5NHwzPRPFybeE3jBhBumnajWRTBDKZBEcPSJ+o4DlMgadltXcEZO6/1yFwyb6p4yg2TKG3rKIP+6fv0etRN30EnVXtzJm3r+8953x5ED9R7H6No+XH1wS3l6hY81mQPE+yDrwxN45F13pXe0EQ==        Attributes:                supportedVmodlVersions: /vcdr/vmomi/drserviceversions.xml                vcInstanceUuid: 3523f7ee-7eca-4ae4-9b99-c51026056869                vmodlVersion: /vcdr/vmomi/drversion.xml                extensionKey: com.vmware.vcDr
Step 3. 

To remove the stale entries run this command with the Service ID you want remove.

/usr/lib/vmidentity/tools/scripts/lstool.py unregister --url http://localhost:7080/lookupservice/sdk --id 47a38601-09dc-4b24-8c60-c80c93a90e31 --user 'administrator@vsphere.local' --password 'VMware123!' --no-check-cert




"%VMWARE_PYTHON_BIN%" "%VMWARE_CIS_HOME%\VMware Identity Services\lstool\scripts\lstool.py" unregister --url http://localhost:7080/lookupservice/sdk --id Service_ID from Step 4--user "administrator@vsphere.local" --password "administrator_password"--no-check-cert




For example:




"%VMWARE_PYTHON_BIN%" "%VMWARE_CIS_HOME%\VMware Identity Services\lstool\scripts\lstool.py" unregister --url http://localhost:7080/lookupservice/sdk --id TMP:608BF497-A198-40C1-9866-545533A488BE --user "administrator@vsphere.local" --password "VMware123!" --no-check-cert 




Step 4. 
Check that it has removed. 

Go to step 2

Warning : Copy to notepad first and paste to command prompt.  If commands fail type manually or copy from output.  "%VMWARE_PYTHON_BIN%" lstool.py

Categories

Uncategorized

One thought on “Remove Stale SRM Entries from PSC Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: