Use the VI Client to change DNS, gateway, and hostname
if you just need to change an ESX server’s DNS servers, default gateway, or hostname you can use the VI client to make the changes. This might be a rare scenario, but it happens every once in a while.
These instructions were copied from VMware KB article 4309499. Click on the screen shot image to the right for a larger version.
From the Virtual Infrastructure Client
- Highlight the ESX Server host and click on the Configuration tab
- Click on DNS and Routing
- Click on Properties…
- To change the hostname, domain, and DNS servers, click on the DNS Configuration tab and enter the appropriate values
- To change the default gateway, click on the Routing tab and enter the appropriate values
Note: Hostname and domain changes through the Virtual Infrastructure Client do not take place until the ESX host is rebooted.If you also need to change the ESX ip address (for the Service Console) you will need to use the esxcfg-vswif console command. Assuming you already changed the DNS and Routing configuration with the VI Client as described above, before you reboot the host access the ESX console and enter the following:
The above command assumes that vswif0 is your service console, a.b.c.d is your new ip address, and w.x.y.z is your new subnet mask.
Finally, reboot the ESX host.
The linked KB article also contains the additional commands and instructions for modifying all these settings from the ESX console.










