Search the VMware Knowledge Base (KB)
View by Article ID

Changing the name of an ESX or ESXi host (1010821)

  • 76 Ratings


This article provides steps to change the name of a VMware ESX or ESXi host.


To rename a VMware ESX host:
  1. If the ESX host is part of a cluster, drag it out of the cluster to remove it from the cluster.
  2. If the ESX host is managed by VirtualCenter/vCenter, disconnect and remove the ESX host from the vCenter.
  3. Make the modifications in your DNS environment to reflect the correct name and IP association for the new name.
  4. Log in as root to the console of ESX host.
  5. Using a text editor, change the name and domain name, if applicable, of the host in these files:

    • /etc/hosts
    • /etc/sysconfig/network

  6. Run this command:

    esxcfg-advcfg -s hostname /Misc/hostname

    where hostname is the new FQDN hostname for the ESX host.

  7. Reboot the ESX host.
  8. Join the ESX host to VirtualCenter/vCenter Server and clusters.
To rename a VMware ESXi host:
  1. If the ESXi host is part of a cluster, first enter the Maintenance mode to remove it from the cluster.
  2. If the ESXi host is managed by VirtualCenter/vCenter Server, disconnect and remove the ESXi host from the vCenter Server.
  3. Connect to the host directly with a vSphere Client.
  4. Click ESXi host.
  5. Click the Configuration tab.
  6. Click DNS and Routing.
  7. Click  Properties.
  8. In the DNS Configuration tab, edit the Name field. Change anything else that is necessary in your environment.
  9. Click OK.
  10. Join the ESX host to VirtualCenter/vCenter Server and clusters.
Run these commands to change the hostname in ESXi 5.x and 6.x using the command line:
  • esxcli system hostname set --host=hostname
  • esxcli system hostname set --fqdn= fqdn

Additional Information

The iSCSI Qualified Name used for iSCSI storage configuration is based on the hostname of the ESX host. If you are facing storage connectivity issue after changing the hostname of the ESX/ESXi host, make sure to review your iSCSI software initiator configuration. For more information about iSCSI troubleshooting, see Configuring and troubleshooting basic software iSCSI setup (1008083).


name-resolution-esx  service-console-hostname

See Also

Update History

05/28/2013 - Added commands to change the host name in ESXi 5.x

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 76 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 76 Ratings