VCF Instance not removed from the fleet management appliance database after deleting the integration in VCF Operations
search cancel

VCF Instance not removed from the fleet management appliance database after deleting the integration in VCF Operations

book

Article ID: 424495

calendar_today

Updated On:

Products

VCF Operations

Issue/Introduction

After deleting a VCF Instance integration in VCF Operations, user is unable to add a new VCF Instance as VCF Operations tried to sync the deleted VCF instance and fails.

Environment

VMware Cloud Foundation Operations 9.0

VMware Cloud Foundation Operations 9.0.1

Cause

The deleted VCF Instance is still present in the fleet management appliance database

Resolution

Before proceeding, take a snapshot of the fleet management appliance. You can use the following as a guide Take Snapshots of a Virtual Machine 

1 - Connect to the fleet management appliance using SSH as the root user.
2 - Connect to the Postgres database with below command :

su - postgres
/opt/vmware/vpostgres/current/bin/psql -U postgres vrlcm

3 - Find all SDDC Manager entries. This will return a list with SDDC Manager hostnames & corresponding vmids

SELECT sddcmanagerhostname,vmid FROM vm_lcops_sddc_manager;

i.e.

vrlcm=# SELECT sddcmanagerhostname,vmid FROM vm_lcops_sddc_manager;

  sddcmanagerhostname   |                 vmid                 
------------------------+--------------------------------------
##.##.#.#                            | ID 1
##.##.#.#                            | ID 2
##.##.#.#                            | ID 3

Identify the ID from vmid column based on the SDDC manager hostname

4 - Delete the stale entry with below statement :

DELETE FROM vm_lcops_sddc_manager WHERE vmid='copy the id from vmid column in the table above';

5 - Reboot the fleet management appliance.

Once user is able to add a new VCF Instance you can proceed deleting the snapshot from the fleet management appliance.