Disable IPv6 in ESXi Kickstart Without Requiring Additional Reboot

Disabling IPv6 in ESXi Kickstart: A Simple Solution

As a Senior Staff Solution Architect in the VMware Cloud Foundation (VCF) Division at Broadcom, I often receive questions from colleagues and customers regarding the configuration of ESXi hosts. Recently, one of my colleagues asked if there was a way to disable IPv6 during ESXi Kickstart without requiring an additional reboot. This got me thinking about the best approach to solving this issue.

By default, ESXi supports dual stack networking (IPv4 and IPv6), and users can also configure just IPv4 or IPv6. However, disabling IPv6 during Kickstart can be a bit tricky, as the 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: leveraging the %pre section. The %pre section ensures that IPv6 is disabled upon the initial reboot after the ESXi installation. To disable IPv6, we can use localcli and update the tcpip4 module parameter as shown in the example below:

Once the ESXi host reboots after the installation, we can confirm that IPv6 is not enabled using either “esxcli system module parameters list -m tcpip4” or “esxcli network ip interface ipv6 get”.

Note that if you wish to configure a pure IPv6 using ESXi Kickstart, please see this blog post for more details.

Patryk, one of my colleagues, asked if there was any specific reason why we should disable IPv6 apart from “I’m not using it”. There are no known bugs or configuration issues that require us to disable IPv6. However, some organizations 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.

That’s it! Disabling IPv6 during ESXi Kickstart is a straightforward process that can be accomplished using the %pre section. As always, I appreciate your feedback and questions in the comments below.

Leave a Reply