I have a really strange issue with the ESXi installation from the Cisco custom ISO file VMware-ESXi-7.0.3d-19482537-Custom-Cisco-4.2.2-a. I cannot make any changes to the "Management Network" port group not matter how I try to do it. I have tried the script below which worked correctly in ESXi 6.7, and I have tried making the changes in ESXi GUI. Neither method accepts the change. It doesn't give an error, it just doesn't change the setting.
esxcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch0
esxcli network vswitch standard policy failover set -l iphash -v vSwitch0
esxcli network vswitch standard policy failover set -a vmnic0,vmnic1 -v vSwitch0
esxcfg-vswitch -B both vSwitch0
esxcli network ip set --ipv6-enabled=false
esxcli network vswitch standard portgroup policy failover set -p "Management Network" -u
esxcli network vswitch standard policy security set -v vSwitch0 --allow-promiscuous=false
esxcli network vswitch standard policy security set -v vSwitch0 --allow-mac-change=true
esxcli network vswitch standard policy security set -v vSwitch0 --allow-forged-transmits=true
If I install ESXi 6.7 first and then upgrade to ESXi 7.0, it works correctly. The only solution I have been able to find is to create a new port group which inherits the option from the vswitch. Move vmk0 to the new port group, delete the old port group, and then rename the new port group the original name. I have this scripted to I don't miss options in the GUI, but my Google magic is failing me and I can't find how to use a CLI option to move vmk0 from one port group to another. Yes, it is easy to do in the GUI but I would emphatically prefer to do it via a script.