VMware vSphere ESXi Host Configuration Fails if the Cloud Proxy Has an Invalid or Unreachable Hostname
search cancel

VMware vSphere ESXi Host Configuration Fails if the Cloud Proxy Has an Invalid or Unreachable Hostname

book

Article ID: 324349

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

VMware vSphere ESXi host configuration fails if the Cloud Proxy has an invalid or unreachable hostname. This article provides information about the issues with the hostname and their resolutions.

Symptoms:

Problem Scenario Symptoms:

  1. Invalid Hostname: While deploying the Cloud Proxy, the hostname field might be empty and is set to photon-machine, which is an invalid hostname.
  2. Hostname is not reachable: The host provided to Cloud Proxy may not be reachable. It can be checked by executing the nslookup command on the host. If the host is invalid, it returns NXDomain for the host.
  3. Hostname has an invalid character: The hostname should not have invalid characters. If the hostname has an invalid character, it cannot be configured on ESXi.
 
 


Resolution

Problem Scenario Resolutions:

  1. Invalid Hostname: While deploying the Cloud Proxy, the hostname field might be empty and is set to photon-machine, which is an invalid hostname.
How to check the hostname:
  • From the Cloud Proxy machine, login as root, use the command hostname to check the hostname of the machine.
image.png
  • In the application UI, go to Configurations > Cloud Proxies, select the Cloud Proxy and check if the hostname matches the value returned from the hostname command.
image.png
 
NOTE: For Cloud Proxy version 7.2.0.52742 Build 19165859 or later:
 
If Cloud Proxy has the hostname set to photon-machine, when you launch the Cloud Proxy machine, a warning comes up - "Invalid hostname! Please set up a correct hostname".

image.png
  • You can update the hostname of the machine using the following command:
/opt/vmware/share/vami/vami_config_net
  • Verify the updated hostname using the command hostname and see if it is returns the updated and correct hostname.
  • Run the script /configure-host-name.sh from the root directory to update the hostname in the agents running inside the container.

You might encounter a scenario in which the hostname returned by the command hostname matches the one present on the application UI, but the configuration still fails. In such a scenario, validate the hostname in java arguments.

Steps to check the hostname in java arguments:
  • Enter the Docker container using the following command.
docker exec -it log-forwarder bash
  • Enter the following command to get the java arguments.
ps –eaf | grep java
 
image.png

Ensure that the hostname is correct in java arguments. If not, update the hostname using the /configure-host-name.sh script.
 

NOTE: The /configure-host-name.sh script will not be present in Cloud Proxy versions earlier than 7.2.0.52742 Build 19165859, reboot the machine to update it to the latest version.


 
  1. Hostname is not reachable: The host provided to Cloud Proxy may not be reachable. It can be checked by executing the nslookup command on the host. If the host is invalid, it returns NXDomain for the host.
image.png

If the host is valid. It returns the hostname and the address of the host

image.png
 
Resolution: Update the hostname of the Cloud Proxy machine with a reachable host. You can update the hostname using the steps provided above.
 
  1. Hostname has an invalid character: The hostname should not have invalid characters. If the hostname has an invalid character, it cannot be configured on ESXi.
image.png

In the above example, it says that there exists an illegal character at index 9, which is ‘_’. If hostname contains ‘_’ character, the configuration will fail.
 
Resolution: The hostname should be updated to a valid one. You can update the hostname using the steps provided in point 1 above.
 
 
 
 


Additional Information

Configuring syslog port (514) on ESXi - https://kb.vmware.com/s/article/2003322