This article provides a proper way to rename an ESXi host, especially after running a bare-metal Foundation install. This also includes non-configurable components which needs to be checked before changing any aspect on Esxi hosts.

Description:

For changing the hostname of an ESXi host, as far as Nutanix is concerned, renaming a host is an instant and secure procedure, and can be done by following VMware instructions, from the below VMware Article: Changing the name of an ESX or ESXi host (1010821).

The following ESXi settings should NOT be manually changed as some of them are non-configurable config and others have dependency on Esxi functionality (Please involve VMware technical Support in case there are any concerns on these components):

For a complete information please refer to the Non-configurable Esxi Components outlined in Non-Configurable ESXi Components.

Solution

For reference, you can check the below steps to change the hostname:

1. Log in to the ESXi host to rename through SSH or DCUI. Display current hostname:

    root@esxi# hostname
    NTNX-Blxxx-1-A

    2. Run the following command to change the hostname:

      root@esxi# esxcli system hostname set --host=hostname

      3. Run the following command to set the fully qualified domain name. Note that –host and –fqdn are mutually exclusive.

        root@esxi# esxcli system hostname set --fqdn=hostname.domain.com

        4. Display the new hostname and fqdn:

          root@esxi# esxcli system hostname get 
             
             Domain Name: domain.com
             Fully Qualified Domain Name: hostname.domain.com
             Host Name: hostname

          5. To clear the domain name and leave only the hostname:

          root@esxi# esxcli system hostname set -d=""
          root@esxi# esxcli system hostname get 
             
             Domain Name:
             Fully Qualified Domain Name: hostname
             Host Name: hostname

          6. Depending on the ESXi version, changes might be reflected automatically or imply a service restart. 

            root@esxi# /etc/init.d/hostd restart 
            
            watchdog-hostd: Terminating watchdog process with PID 34187 
            hostd stopped. 
            Ramdisk 'hostd' with estimated size of 1053MB already exists 
            hostd started.

            7. There is a known limitation with the NFSv3 implementation in VMware. The NFS lock files (.lck) in the VM directory will have the name of the previously named host no matter if existing, moved via VMotion or newly created VMs. This limitation only gets fixed by rebooting the ESXi host. We recommend rebooting the host after a host rename due to the fact that troubleshooting as well as log analysis can be more difficult. 

            发表回复

            您的电子邮箱地址不会被公开。 必填项已用 * 标注