Have you even wanted to change the name of an object in the vCenter inventory that is managed by VCF? For example, you have just deployed a new VI Workload Domain and the vDS name created during the installation does not match your naming standard? Unfortunately, the only way to do this is to dive deep into the SDDC Manager PostgreSQL database and manually change table entries to reflect the truth you want in vCenter.
This is a totally unsupported change by VMware and is not recommended for anyone not comfortable with database manipulation. In all cases you should make a backup and/or a snapshot of your vCenter and SDDC Manager VMs to be able to roll-back if things go awry!
So, lets look at some examples…
Change vDS Name
I have just deployed a new Workload Domain in my second tenant (T02) called WD02-CL01. Everything looks OK in vCenter in the Hosts and Clusters view.

When looking at the vDS however, I see the name that was created automatically by SDDC Manager and this does not match my naming standard.

You don’t see this anywhere in the SDDC Manager GUI, you have to dive into the PostgreSQL database. So let’s do that:
1. Backup and/or Snapshot your vCenter and SDDC Manager VMs
2. SSH to the SDDC Manager VM and log in using the SDDC Manager Super User credential (should be vcf)
3. Switch to the root user entering the virtual appliance root user password when prompted:

4. Connect to the local Postgres database:
psql -h localhost -U postgres
5. Connect to the database “platform”:
\c platform
6. Display a list of the database tables:
\dt

7. Next comes the tricky part. You need to view the contents of the vds table to retrieve the ID of the vDS you wish to rename by typing:
select id, name from vds;

8. Change the name value for the ID of the desired vDS. In my case I want the vDS to be named WD02-CSD-VDS-01
update vds SET name = 'WD02-CSD-VDS-01' WHERE id = '60b2d872-4afb-4cd7-9716-f0da9413fb42';
9. Check that the name has been changed by executing the select id command again:

10. Rename the vDS in the vSphere Web Client manually to reflect the new name:

Hopefully everything has worked and the vCenter inventory now matches the SDDC Manager database!

Well, that was not too difficult, let’s change the vSAN datastore name now…
Change vSAN Datastore Name
As we can see, SDDC Manager chose a name for our new vSAN datastore that also does not match our standard:

1. Repeat steps 1 – 6 above to log in to the SDDC Manager VM and Postgres database
2. Display the vSAN datastore names in the cluster table:
select id, primary_datastore_name from cluster;

3. Now to change the name. I want it to be “DS-WD02-CSD-VSAN”:
update cluster SET primary_datastore_name = 'DS-WD02-CSD-VSAN' WHERE id = '1f6e3e8f-4ef9-4e84-8d9f-af08d1abf210';
4. Check that the new name has taken by executing the select id command again

5. Rename the vSAN datastore in the vSphere Web Client manually to reflect the new name

6. Hopefully everything has worked and the vCenter inventory now matches the SDDC Manager database!

Closing Note
I hope this blog post was useful – The same method can be used for other resources in the SDDC Manager database but as always, use extreme caution and do not expect any support from VMware (or me😉) if it all goes wrong!.
Feel free to share if you found this article useful and leave your feedback in the comments.
Until the next time!