ESX kickstart script warning: "bootproto was set to DHCP but "--nameserver=" was set. Nameservers are ignored with DHCP"
search cancel

ESX kickstart script warning: "bootproto was set to DHCP but "--nameserver=" was set. Nameservers are ignored with DHCP"

book

Article ID: 427841

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

During an ESX install with a kickstart script setting a custom DNS with --nameserver while using --bootproto=dhcp gives the following warning: 

bootproto was set to DHCP but "--nameserver=" was set. Nameservers are ignored with DHCP

Environment

ESX 7.x, 8.x, 9.x 

Cause

The ESXi kickstart --nameserver parameter is only supported with --bootproto=static. This is mentioned in the installation documentation:

--nameserver=
Designates the primary name server as an IP address. Used with the --bootproto=static option. Omit this option if you do not intend to use DNS.

Resolution

To use custom DNS while using ESX kickstart install scripts use one of the following options:

  1. Ensure --bootproto=static is set.
  2. Configure with %firstboot. Sample:

%firstboot --interpreter=busybox
# Add custom DNS servers
localcli network ip dns server add --server=#.#.#.#
localcli network ip dns server add --server=#.#.#.#