I want to add more then two DNS in the ESXi host.but I have only two (preferred and alternate)
can you any one help me on this?
regards
Manic
You can also use VMware PowerCLI to add multiple DNS servers. From the PowerCLI console:
Get-VMHost <esxhostname> | Get-VMHostNetwork | Set-VMHostNetwork -DnsAddress "x.x.x.x","x.x.x.x","x.x.x.x"
If want to apply this to all ESX hosts, just remove the <esxhostname>:
Get-VMHost | Get-VMHostNetwork | Set-VMHostNetwork -DnsAddress "10.0.0.1","10.0.0.2","10.0.0.3"
Arnim van Lieshout
Now available for pre-order: VMware vSphere PowerCLI Reference: Automating vSphere Administration
Unlock the support mode of ESXi / log in with ssh. Edit the file /etc/resolv.conf with a text editor like vi and insert another "nameserver xxx.xxx.xxx.xxx" line above the "search domain.com" line.
Regards
You can use vicfg-dns from the vCLI to set multiple DNS servers. Not sure it's exactly supported, but it seems to work OK.
C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-dns.pl --server esx01
-D 192.168.1.25,192.168.1.20,192.168.1.5,192.168.1.6
Updated Host DNS network configuration successfully.
C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-dns.pl --server esx01
DNS Configuration
Host Name esx01
Domain Name mishchenko.net
DHCP false
DNS Servers
192.168.1.25
192.168.1.20
192.168.1.5
192.168.1.6
Do I need to restart any service?
If you do it by editing the /etc/resolv.conf you don't need to restart anything. It's used from the moment you save the file.
Don't know for Daves solution.
You can also use VMware PowerCLI to add multiple DNS servers. From the PowerCLI console:
Get-VMHost <esxhostname> | Get-VMHostNetwork | Set-VMHostNetwork -DnsAddress "x.x.x.x","x.x.x.x","x.x.x.x"
If want to apply this to all ESX hosts, just remove the <esxhostname>:
Get-VMHost | Get-VMHostNetwork | Set-VMHostNetwork -DnsAddress "10.0.0.1","10.0.0.2","10.0.0.3"
Arnim van Lieshout
Now available for pre-order: VMware vSphere PowerCLI Reference: Automating vSphere Administration
you could also do the following via the TSM
vim-cmd hostsvc/net/dns_set --ip-addresses=10.0.0.1,10.0.0.2
Works fine here,
Duncan (VCDX)
Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive