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.
VMware Cloud Foundation Operations 9.0
VMware Cloud Foundation Operations 9.0.1
The deleted VCF Instance is still present in the fleet management appliance database
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.