ESXi supports dual stack networking (IPv4 and IPv6) by default, however users can also configure just IPv4 or IPv6, which requires a system reboot for the changes to go into effect.
Recently, I received a question from a colleague asking if there was a way to disable IPv6 during ESXi Kickstart (aka scripted installation) but NOT require an additional reboot as this setting is typically added in the %post or %firstboot section, which will require an additional reboot due to changing the networking stack default.
The solution was actually quite simple by just leveraging the %pre section, which would ensure that IPv6 is disabled upon the initial reboot after the ESXi installation.
We can disable the IPv6 option by using localcli an updating the tcpip4 module parameter as shown in %pre example below:
%pre --interpreter=busybox localcli system module parameters set -m tcpip4 -p ipv6=0
Once the ESXi host reboots after the installation, we can can confirm that IPv6 is not enabled using either "esxcli system module parameters list -m tcpip4" or "esxcli network ip interface ipv6 get"
Note: If you wish to configure a pure IPv6 using ESXi Kickstart, please see this blog post HERE for more details.
Patryk says
That’s a good tip, thanks William!
Anyway got a related question, is there any specific reason WHY disable IPv6 apart of “I’m not using it”?
Any bugs or config that says - do it?
Something that will actually requires us to do that and not just our will to have things not used disabled..
William Lam says
For some organizations, they have policies of disabling things that aren't in use and there's nothing wrong with IPv6 being enabled (you'll just get a link-local address). If you're never going to use IPv6, it could simplify output when you have multiple VMkernel interfaces since you'll see both IPv4 and IPv6, so that could also be another reason