Did not properly or successfully migrate vmkernel adapter portgroup from vDS to Standard switch prior to removing host from vCenter (Disabling vNetwork Distributed Switches [To migrate networking from DVS to Standard Switch]).
Had to use ESXi DCUI to restore networking configurations from vDS to Standard switch (Understanding network rollback and recovery in vSphere 7.0 and later).
vSphere client error:Operation failed, diagnostics report: Unable to delete portgroup "vMotion-Old", for the following reasons: VM Kernel NIC
ESXi hostd.log error:DoRemoveVirtualSwitchPortGroup: Unable to delete portgroup "vMotion-Old", for the following reasons: VM Kernel NIC
Removing a portgroup with a VMkernel NIC is not supported. The vmknic must first be removed from the portgroup before the portgroup can be removed. The vmknic has been automatically set to disabled, making it not visible and unable to remove it from the vSphere client.
Connect to the ESXi host via SSH using root user.
Run command to list the vmknics:esxcfg-vmknic -l
Find the name of the portgroup you need to remove. The “Enabled” column for it will show “false”.
Run command to enable the vmk:
esxcfg-vmknic -e <pg_name>
If you are using “TCP/IP stacks” other than the “Default TCP/IP stack”, you may receive an error stating the portgroup is not found in the “defaultTcpipStack”.
Error performing operation: Unable to find vmknic for portgroup: <pg_name> netstackInstance: defaultTcpipStack at config location /net/vmkernelnic/child
If you receive an error similar to the above, run the command with the “-N” (Network stack) switch and include the network stack name (e.g., “vmotion”, etc.). The network stack for the affected portgroup can be found in the “NetStack” column from the list output.
esxcfg-vmknic -e <pg_name> -N <NetStack_name>
Run the vmknic list command from above again to confirm the vmknic now shows as “true” in the “Enabled” column.
Now that the affected vmknic is enabled, navigate to the vSphere client and view the VMkernel NICs for the the affected ESXi host. The vmknic that needs to be removed should now be visible.
If you decide you want to continue using this vmnic and portgroup, you should now be able to. Otherwise, you can proceed with removing them to clean up.
Remove the vmknic from the unwanted portgroup, and then remove the portgroup.