Symptoms:
When modifying a portgroup such as when renaming it, or while upgrading a virtual switch, the settings of the portgroup, such as for VLAN ID, seem to disappear.
When we run the command:
esxcfg-vmknic -l
We see that all vmknics are accessible and the enabled value for all of them shows as true.
In the case of renaming a portgroup, in vpxa.log you will see that the incremented changes refer to the old name AFTER the point of renaming, and referencing the new name. Example below, using a hypothetical port group with an old name of "VM-OLDNAME", and a new name of "VM-NEWNAME", we see the old name appearing in increments after the new name was established:
2021-09-28T07:40:48.519Z info vpxa[1109556] [Originator@6876 sub=vpxaInvtHost opID=TIF-37c5e5bb update=10076] Increment master gen. no to (615): HostChanged|configManager.networkSystem:networkInfo.vswitch["key-vim.host.VirtualSwitch-vSwitch1"].portgroup["key-vim.host.PortGroup-VM-NEWNAME"]
2021-09-28T07:40:48.519Z info vpxa[1109556] [Originator@6876 sub=vpxaInvtHost opID=TIF-37c5e5bb update=10076] Increment master gen. no to (616): HostChanged|configManager.networkSystem:networkInfo.portgroup["key-vim.host.PortGroup-VM-NEWNAME"]
2021-09-28T07:40:48.519Z info vpxa[1109556] [Originator@6876 sub=vpxaInvtHost opID=TIF-37c5e5bb update=10076] Increment master gen. no to (617): HostChanged|configManager.networkSystem:networkInfo.vswitch["key-vim.host.VirtualSwitch-vSwitch1"].portgroup["key-vim.host.PortGroup-VM-OLDNAME"]
2021-09-28T07:40:48.519Z info vpxa[1109556] [Originator@6876 sub=vpxaInvtHost opID=TIF-37c5e5bb update=10076] Increment master gen. no to (618): HostChanged|configManager.networkSystem:networkInfo.portgroup["key-vim.host.PortGroup-VM-OLDNAME"]
2021-09-28T07:40:48.521Z info vpxa[1109713] [Originator@6876 sub=vpxLro opID=jsu5bexs-44775-auto-q5b-h5:70016391-38-60732aa0-30] [VpxLRO] -- FINISH lro-4430
2021-09-28T07:40:48.547Z info vpxa[1110204] [Originator@6876 sub=vpxaInvtHost opID=TIF-46efd36f update=10077] Increment master gen. no to (619): HostConfig:VpxaInvtHostListener::HostChanged(network)