Symptoms:
Upgrading to VCF Usage Meter can result in the below warning message while upgrading to 9.0
Detected wrong hostname. Expected hostname: ${host}, but found: ${current_hostname}.This will most probably result in issues after upgrade with the existing vCloud Usage Meter certificates.
Please change the hostname and then you can either generate a new self-signed
certificate or import an internal Certification Authority (CA) - Signed Certificate.
Note: The certificate CN must match the hostname of the vCloud Usage Meter appliance.
For information, see vCloud Usage Meter Certificate Management.
I understand the issue and want to proceed with upgrade. (y/n):
Usage Meter 4.x
If the VCF Usage Meter detects that the hostname is incorrectly set and does not match the DNS-resolvable name (i.e., the name returned by DNS), the warning message will be displayed during the upgrade process.
If you choose to ignore this message and proceed, you may encounter issues when logging in or accessing the Web interface after the upgrade.
This mismatch can be verified using the following methods:
Run the hostname command on the Usage Meter appliance to check the configured hostname:
$ echo $(hostname)
To retrieve the IP address assigned to the default network interface (i.e., the interface used for the default route).
$ ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1
Perform a reverse DNS lookup on the IP address to obtain the corresponding FQDN:
$ dig +noall +answer -x "<Insert IP address from above step here>" | awk '{print $5}'
The fully qualified domain name (FQDN) of the hostname must match the results.
To update the hostname in Usage Meter Appliace 4.8:
1.Take a snapshot of your Usage Meter instance
2.Verify the hostname and update hosts file
$ cat /etc/hosts
Expected output sample:
127.0.0.1 <hostname.fqdn> host_short_name localhost <<< "127.0.0.1" is expected, and where <hostname.fqdn> is the fully qualified name
i.e. 127.0.0.1 myusagemeter.broadcom.com myusagemeter localhost
3.Verify and update the usagemeter appliance hostname : $ /opt/vmware/share/vami/vami_config_net
Expected output sample: 0) Show Current Configuration (scroll with Shift-PgUp/PgDown) 1) Exit this program 2) Default Gateway 3) Hostname 4) DNS 5) Proxy Server 6) IP Address Allocation for eth0 Enter a menu number [0]: 0
Network Configuration for eth0 IPv4 Address: 192.168.100.100 Netmask: 255.255.255.0 IPv6 Address: Prefix:
Global Configuration IPv4 Gateway: 192.168.100.1 IPv6 Gateway: Hostname: <hostname.fqdn> <<< DNS Servers: 192.168.100.53 Domain Name: Search Path: .fqdn Proxy Server:
Select option 3 to change Hostname.
4.Verify hostname in HostOS (Photon)
$ hostnamectl
To update hostname in HostOS (Photon)
$ hostnamectl set-hostname <hostname.fqdn>
5.To prevent reversion of the host name, edit the file
/etc/sysconfig/networking/devices/ifcfg-eth0
to ensure the hsot has the correct name.
6.Update self-signed certificate, log in as "usagemeter" in the Usage Meter Console window to perform the workaround.
Alternatively, you can take SSH to the usage meter appliance and login as "usagemeter" account.
vCloud Usage Meter Certificate Management
7.Upgrade Usage Meter and you should no longer see the error message.
8.Remove snapshot. (Reverting to the snapshot of the source VCF Usage Meter appliance is not recommended, unless an error occurs during the upgrade.)