/opt/vmware/share/vami/vami_config_net fails with the error "Unable to set hostname to <new_hostname> reverting to previous hostname:"This issue occurs when the existing hostname of the vCenter is hard coded in the /etc/hosts file.
Example:
$ cat /etc/hosts
# Begin /etc/hosts192.168.1.15 vc.example.com# End /etc/hosts
$ systemctl restart dnsmasq$ systemctl restart systemd-resolved$ nslookup <vCenter_FQDN>$ nslookup <vCenter_IP>Note: Do not update or remove anything between the #VAMI_EDIT_BEGIN and #VAMI_EDIT_END sections.
Having an entry for the vCenter FQDN in /etc/hosts is not a requirement if external DNS is able to resolve the vCenter FQDN.