Failed - A specified parameter was not correct: DnsConfig.addressFailed - A specified parameter was not correct: DnsConfig.VirtualNicDeviceFailed - The object or item referred to could not be found.In certain cases, due to a user interface limitation, it is not possible for the default gateway setting for a TCP/IP stack other than the Default TCP/IP stack to be saved from the ESXi Host Client.
This setting can be set successfully in vSphere Client. vSphere Client is the recommended method of managing hosts that are connected to a vCenter.
Solution:
Log in to the vSphere Client.
Select the ESXi host you are managing.
Click Configure.
Navigate to Networking > TCP/IP configuration.
Select the ellipsis (…) next to the TCP/IP stack you want to configure (for example, vMotion).
Enter the default gateway in the VMkernel gateway field.
Click OK to apply the changes.
It is also possible to change this setting using the command line:
esxcfg-route -a default 172.16.##.1 -N "vmotion"
oresxcfg-route -a 0.0.0.0/0 172.16.##.1 -N "vmotion"
- Replace "vmotion" with the name of your custom TCP/IP stack if needed
(you can obtain this using esxcli network ip netstack list).
- Replace 172.16.##.1 with the desired default gateway.
Confirm changes with: esxcfg-route -l -N "vmotion"
Option 1. Use vCenter to set the gateway for a single VMkernel adapter.
Option 2. Use esxcli to set the default gateway for a single VMkernel adapter.
esxcli network ip interface ipv4 set --interface-name vmk2 --gateway 172.16.##.1 --type static --ipv4 172.16.##.99 --netmask 255.255.255.0