Is there a way to set a gateway via esxcli (kickstart script) for a netstack instance (vSphere 6.0 and above)?
What I've done yet:
esxcli network ip netstack add -N vmotion
esxcli network ip interface add -i vmk1 -p "pgName" -N vmotion
esxcli network ip interface ipv4 set -i vmk1 -t static -I 172.16.10.210 -N 255.255.255.0
Now I need to set a default gateway for netstack "vmotion". I know the -g parameter while setting ip Interface for vSphere 6.5 but it's not working here.
Have you tried:
esxcli network ip interface ipv4 set –i vmknic -t static –g gateway -I IP address -N mask
As i mentioned "-g gateway IP" only works for vSphere 6.5 but not for 6.0. But I've found entries in file /etc/vmware/esx.conf but there are so many related to the corresponding vmk.