Applying DVPG Configuration Drift bundle on SDDC Manager fails with
REFRESH_VM_NAMES_FAILED
Below is the error in /var/log/vmware/vcf/domainmanager/domainmanager.log
2024-06-26T14:12:22.531+0000 ERROR [vcf_dm,667c21c6bdb293a0019881376252b10d,53f0] [c.v.v.c.c.a.RefreshVMNamesAction,dm-exec-3] Failed to refresh VM list.
java.lang.IllegalArgumentException: Expected 1 but did not find any MORs of a type DistributedVirtualPortgroup and name <Port_group_name>
VMware Cloud Foundation 5.x
VMware Cloud Foundation 4.x
dvPortGroup renamed manually in vCenter inventory and is not matching with port_groups entry in vds table of Platform database in SDDC Manager
In a SDDC Deployment renaming dvPortGroup manually in vCenter is not a recommended action.
Match the dvPortGroup name in vCenter inventory and SDDC database
Perform either of the below options to resolve the issue
Option 1: Rename the dvPortGroup in vCenter inventory back to original name which is updated in SDDC Manager database
psql -h localhost -U postgres -d platform
\x
select * from vds where name='<name of the dvs switch>';
\q
Option 2: Update SDDC Manager database with the renamed dvPortGroup.