Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

Skip to main content

My Subscriptions

Loading

Knowledge Base

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

Last Updated: 3/21/2024Categories: How toTotal Views: 220208Language:
English

103 like this article

Subscribe to get an email
newsletter with new updates

103 people found this helpful Please provide article feedback:

Learn how VMware Skyline Advisor and Skyline Health Diagnostics work together to provide proactive intelligence and self-service log analysis.

Use Skyline Advisor to avoid issues before they occur across VCF, vSphere, vSAN, NSX, vROps & Horizon. Skyline Findings are based on top KBs, VMSAs/CVEs and design best practices.

Use Skyline Health Diagnostics to root cause vSphere & vSAN logs when an issue occurs. Skyline Health Diagnostic Findings are based on top KBs and VMSA/CVEs. You can use the Skyline Health Diagnostics tool in online or offline mode.

If you require additional help from technical support, please use Skyline Advisor to initiate a Log Assist to reduce time to upload logs. TSEs can also initiate logs to reduce effort.

Purpose

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

If hostname and DNS configuration reverts to original values after rebooting the VCSA machine see VMware vCenter Server Appliance hostname and DNS configuration revert after a reboot (2122383).

Resolution

Notes:

If the management network of the ESX/ESXi host is on a vSphere Distributed Switch, migrate the network to a vSphere Standard Switch before proceeding. For more information, see Disabling vNetwork Distributed Switches (1010718).

If the ESX/ESXi host is a part of a VSA cluster, do not remove the host from inventory. To workaround this issue, see Recover Cluster workflow in VMware vSphere Storage Appliance adds hosts to vCenter Server by IP address rather than FQDN (2045779).

If ESXi host is a part of a vSAN cluster, the node in maintenance mode may still be primary or backup node in vSAN cluster, and you must manually drag the ESXi host out of the cluster to remove it from the cluster.

To rename a VMware ESX host:

If the ESX host is part of a cluster, drag it out of the cluster to remove it from the cluster.

If the ESX host is managed by VirtualCenter/vCenter, disconnect and remove the ESX host from the vCenter.

Make the modifications in your DNS environment to reflect the correct name and IP association for the new name.

Log in as root to the console of ESX host.

Using a text editor, change the name and domain name, if applicable, of the host in these files:

/etc/hosts

/etc/sysconfig/network

Run this command:

esxcfg-advcfg -s ESXi_FQDN /Misc/hostname
where ESXi_FQDN is the new FQDN hostname for the ESX host.

Reboot the ESX host.

Join the ESX host to VirtualCenter/vCenter Server and clusters.

To rename a VMware ESXi host using the Flash/Flex client:

If the ESXi host is part of a cluster, first enter the Maintenance mode to remove it from the cluster.

If the ESXi host is managed by VirtualCenter/vCenter Server, disconnect and remove the ESXi host from the vCenter Server.

Connect to the host directly with a vSphere Client.

Click ESXi host.

Click the Configuration tab.

Click DNS and Routing.

Click Properties.

In the DNS Configuration tab, edit the Name field. Change anything else that is necessary in your environment.

Click OK.

Join the ESX host to VirtualCenter/vCenter Server and clusters.

To rename a VMware ESXi host using the HTML client:

If the ESXi host is part of a cluster, first enter the Maintenance mode to remove it from the cluster.

If the ESXi host is managed by VirtualCenter/vCenter Server, disconnect and remove the ESXi host from the vCenter Server.

Connect to the host directly with a vSphere Client and select the ESXi host

Select Configure - TCP/IP configuration

Select the Default TCP/IP Stack, and then click the Edit button

Set hostname and Domain Click OK.

Join the ESX host to VirtualCenter/vCenter Server and clusters

To rename a VMware ESXi host using the command line:

If the ESXi host is part of a cluster, first enter the Maintenance mode to remove it from the cluster.

If the ESXi host is managed by VirtualCenter/vCenter Server, disconnect and remove the ESXi host from the vCenter Server.

Connect to the ESXi Shell  please see Using ESXi Shell in ESXi 5.x, 6.x and 7.x

Run the below command, the switch host would be used IP and the switch for fully qualified domain name (FQDN).:

esxcli system hostname set --host=hostname
esxcli system hostname set --fqdn=fqdn

5. Join the ESX host to VirtualCenter/vCenter Server and clusters

Related 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.

Unable to rename the iSCSI initiator on the ESXi host (2146492)
Disabling vNetwork Distributed Switches
Cambiar el nombre de un host ESX o ESXi
Como mudar o nome de um host ESX ou ESXi
Recover Cluster workflow in VMware vSphere Storage Appliance adds hosts to vCenter Server by IP address rather than FQDN
ESX または ESXi ホストの名前の変更
更改 ESX 或 ESXi 主机的名称

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

No results for undefined

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

Related Versions:

VMware vSphere ESXi 7.0.0

VMware vSphere ESXi 6.5

VMware vSphere ESXi 6.0

VMware vSphere ESXi 5.5

VMware vSphere ESXi 5.1

VMware vSphere ESXi 5.0

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESXi 3.5.x Installable

VMware ESXi 3.5.x Embedded

view all

Take Our Survey

Copyright © 2024 VMware, Inc. All rights reserved.

Terms of Use

Your California Privacy Rights

Privacy

Accessibility

Cookie Settings

Support Assistant