When setting the default gateway parameter of the management interface in the DCUI, the setting seems to work, but when you leave the management configuration screen and it resets the network, you get an error:
Unable to set VMKernel gateway address (###.###.###.###) : Unable to Set : Network unreachable. Please verify your IP settings and try again.
This occurs after resetting the ESXi host network setting with the Restore Networking option.
ESXi all versions
In some instances, when a VMKernel adapter exists on the host that is in the vMotion IP stack rather than default, this issue will occur because the resource is being held as used and the kernel adapter doesn't get deleted.
When this adapter is the only VMK available, the DCUI configuration script will attempt to use it for management, but can't set the gateway because it is not in the default IP stack.
There is no resolution to prevent this issue from occurring. If you do have this issue, you can recover the management using the following steps.
esxcli network ip interface listesxcli network vswitch standard listesxcli network vswitch standard portgroup list -v <vswitch>esxcli network ip interface remove -i <adapterName> esxcli network vswitch standard portgroup remove -p <portgroupName>esxcli network vswitch standard remove -v <vswitchName>