Quick Tutorial

Change Hostname ESXi: Quick Tutorial (With Command Line)

Struggling to change the hostname of an ESXi host? Here’s a quick 5 minute tutorial with commands and graphics to ease out the process of changing the hostname of VMware ESXi.

How to Change Hostname of an ESXi Host?

I assume that you’ve already installed ESXi on your machine but in case, you haven’t you may refer to this resource (esxipro.com/#installation) for it.

Moving on to the subject of concern, there are many methods to change ESXi host but today, we’ll go through the quick & easy ones.

1Change VMware ESXi Host Using the HTML5 Client Method

This is the quickest method to rename the ESXi host and requires no major change in the server to access and change hostname. Here are the steps:

  1. Access the host directly via the ESXi web client and you’ll see the default hostname, something like “ESXi.xyz”
    ESXi Networking Interface
  2. Find “Networking” from the items at the left bar and select “default TCP/IP Stack”
    TCP/IP Stack Selection
  3. Next, click on “Edit Settings”
    Edit Settings Button
  4. Now change the hostname from there
    Change Hostname Field
  5. Hit save and you’re done.

That’s how you rename the host of an ESXi host without logging into the ESXi host server.

Note: Do not forget to update the DNS records with the new host to not face name resolution issues while adding the host back to vCenter.

2Rename ESXi Using CLI Method

Unlike the HTML5 client method, this esxcli method requires command line and for that, we would need to take an ESXi SSH session. Follow the steps below:

  1. Open the VMware program and press F2
  2. Now type in the root password
    Root Password Entry
  3. From the list of options, click troubleshooting options and enable ESXi shell
    Enable ESXi Shell
  4. To access the shell, on your keyboard press Alt F1 for Windows & for macOS, Fn + Option + F1.
  5. Now enter the login root and password and run the commands below:
    • esxcli system hostname set –host=YOURHOSTNAME
    • esxcli system hostname set –fqdn=REQUIREDFQDN
    • hostname
    Command Line Execution

That’s how easy that was.

3Host Profile to Change ESXi Hostname

Host profiles is one of the features that vCenter offers and it enables user to capture the configuration of any ESXi host and also, set standard configuration to other hosts.

Steps:

  1. From a reference host, create a host profile
  2. You’ll have plenty of options to play with while creating
  3. Attach the configured profile to the target host and apply
  4. Now while applying users can define host-specific parameters like hostname.

Though there are various other methods to change or rename the ESXi hostname but these three are surely more than enough.

Questions Related to Changing ESXi Hostnames

What versions can I change hostname with the methods?

You can rename ESXi hostname for all versions irrespective to their release date. From ESXi 6.5 to latest 7.0 & 8.0, all versions are compatible with the shared methods.

Why to Change VMware ESXi Hostname?

There can be any reason to change the default ESXi hostname to any custom but here are possible reasons to do so:

  • Company Policy Issue
  • Initial Configuration Wrong
  • Moving from simple domain to FQDN (Fully Qualified Domain Name) format
  • DNS Compliance
  • IP address Issues