I have written numerous articles on the topic of ESXi Scripted Installation aka Kickstart, which is just one of the many options that enables customers to fully automate the installation and configuration of their ESXi hosts. An interesting question that recently came up internally was whether you could configure ESXi networking using IPv6, rather than IPv4 using the default ESXi Kickstart network parameters?
If you look at the ESXi network params as they are labeled such as netmask, it would seem that these are only applicable to IPv4. Although my personal experience has been exclusively IPv4, I figure I would take a quick look at the python code which powers the ESXi Kickstart infrastructure which is located under /usr/lib/vmware/weasel directory. Although I am not a Developer, from what I could grok, it seems like IPv6 might actually be possible using these exact same parameters.
Using Nested ESXi and the new vSphere 7.0 Update 2 feature HTTP Boot over virtual EFI, I was able to setup a quick prototype to validate that you can indeed configure IPv6 using the same ESXi networking parameters, which are applicable to both IPv4 and IPv6.
The only difference is that for IPv6, the netmask parameter accepts a network prefix rather than a traditional netmask value. Below is a snippet from my ESXi Kickstart which demonstrates the configuration of IPv6 networking.
vmaccepteula install --firstdisk --overwritevmfs reboot rootpw VMware1! network --bootproto=static --ip=2a01:7c8:aab5:4ce::1 --netmask=48 --gateway=2a01:7c8:aab5::1 --nameserver=2a01:aaa:aaab::1 --hostname=esxi-1.primp-industries.local
If we look at the esxi_install.log, we can see that our IPv6 parameters are properly parsed by the installer.
Once the installation has completed, we can now confirm that our ESXi host has been installed and configured with an IPv6 address and IPv4 is not configured as expected.
After all these years writing about ESXi Scripted Installation, it is still cool to learn something new! I also plan to file a documentation enhancement so that our official documentation will include this information.
KW says
Hey William, cool Quick Tip and very useful. Did you also test if it is possible to assign a IPv4 and an IPv6 Mgmt. Address to an ESXi Host via the kickstart script so that the Host is Dual Stack enabled?
William Lam says
If you're using the Kickstart "network" param, you can only setup either IPv4 or IPv6. If you want to have dual stack, then you can do IPv4 and then use ESXCLI as part of your firstboot to configure IPv6 interface or reverse, setup IPv6 initially then IPv4 afterwards.
KW says
Thank you for the Quick Tip, the Reply and show a Solution for the dual stack configuration. We will test this and check how it goes.
jhg03a says
It does get more messy though when secure boot is enabled and you can't use the firstboot section of the config. I think the only thing you can really do for dual stack at that point is host profiles or just manually setup the extra addresses.
venkat says
Hi William lam,
is there a way to determine who put the hosts in maintenance mode and DRS is set to manual mode