Changing hostname of VMware ESXi 6.5

Today we will show how to change hostname of an Esxi 6.5 host, if you have to do it anytime or for any reason. Admins have options when it comes to changing an ESXi 6.5 host name, but only the vSphere Web Client has full functionality in the latest release. So you can use vSphere windows client, web client or ssh with esxcli function.

Before making any changes of the hostname of the server, you need to put it into the maintenance mode, in order not rebooting it. Be carefull to move all the virtual machines running on the host before entering maintenance mode.

So under Actions -> Enter maintenance mode and press Yes for the warning.

2018-03-27_19h18_23

2018-03-27_19h18_47

To change the host name and DNS server configuration with the vSphere Web Client, select a host and go to the TCP/IP configuration page, which is under the Configure tab. Select the default TCP/IP system track and click the pencil icon to edit the settings.

2018-03-27_19h12_19

Enter the new hostname that you will be provided to this host and save.

2018-03-27_19h15_16

We can also connect to ESXi via Secure Shell (SSH) and use command-line tools to change the host name and DNS server configuration. The most popular of these tools is the PuTTY SSH client. You need to enable an SSH connection to your ESXi host to use PuTTY and SSH.

First check the hostname of the esxi using cat of the /etc/hosts file :

2018-03-27_19h22_19

Then run the following esxcli commands to change the hostname and set the fqdn.

  • esxcli system hostname set –host=hostname
  • esxcli system hostname set –fqdn= fqdn

2018-03-27_19h25_17

After that, we check the new hostname of the esxi, on html5 gui :

2018-03-27_19h26_46

So as you see it’s relatively easy to rename an ESXi host and change a DNS server configuration.

Thank you !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.