VMware Cloud Community
akreitman
Contributor
Contributor

alternate nameserver parm in ks.cfg

    How do I specify the alternate nameserver in a ks,cfg?

Thanks

0 Kudos
1 Reply
lamw
Community Manager
Community Manager

The pxeboot options only allow you to specify a single nameserver, if you try to specify two seperated by a comma, the installer will throw a syntax error for ESXi.

You can specify an alternate nameserver within the kickstart itself as part of the %post or %firstboot stanza to provide additional DNS servers. If you need to specify this during pxeboot, then you could play some games with the commandline and then dynamically generating a script which will append it to the actuall installation. Take a look at this post for some ideas - http://www.virtuallyghetto.com/2011/05/semi-interactive-automated-esxi.html

I would just recommend creating a file containing the various DNS servers if it's site specific and perform a simple parse depending on the hostname/etc. to generated the DNS servers to be configured on the ESXi host during installation using vim-cmd.

e.g.

vim-cmd hostsvc/net/dns_set --ip-addresses=172.30.0.100,172.30.0.200

0 Kudos