[SOLVED] - Error Configuring vCenter HA

14 Feb 2019 by Simon Greaves

If you get this error message when enabling VCHA:

Error: Failed to get management network information. verify if management interface (nic0) is configured correctly and is reachable

There are a few things to check.  First of all, is the hostname of the vCSA set correctly.  Run the following commands through SSH to the vCSA appliance.

Command> appliance.version1.networking.dns.hostname.get

Name: vcsa.domainname.com

Ensure that the vCSA name is the fully qualified domain name, even if the vCSA is not on a domain yet.  If you return the shortname, unfortunately the fix is to reinstall the vCSA.

Run the next few commands by logging into the shell of the vCSA

Command> shell
Shell access is granted to root

Check the hosts file

cat /etc/hosts

# Begin /etc/hosts (network card version)

# End /etc/hosts (network card version)


# Generated by Studio VAMI service. Do not modify manually. vcsa.domainname.com vcsa localhost

::1 vcsa.domainname.com vcsa localhost ipv6-localhost ipv6-loopback


Check the HOSTNAME file

cat /etc/HOSTNAME

Perform an nslookup against the DNS server for forward and reverse entries.  Note: by default the vCSA will use itself as a DNS server ( so be sure to run the command against the actual DNS servers used as well.

nslookup - serverip

If all is correctly configured try running the prepare-vcha script on it’s own on the vCSA to get past this error.  As VCHA is failing before running this command, the logs that would point to an error don’t exist yet until you run it manually.  So run it manually to see if there is anything else that might be causing the error or to get past it completely.

Check the prepare-vcha logs for success messages.
cat /var/log/vmware/vcha/prepare-vcha.log

If that command runs correctly, return to the GUI and click past the error message to continue.

If the prepare-vcha command does not run successfully, you should get an error that will point you in the right direction.  If you get this error:

logs available at: /var/log/vmware/vcha
Traceback (most recent call last):
File "/usr/sbin/prepare-vcha", line 660, in <module>
File "/usr/sbin/prepare-vcha", line 641, in main
File "/usr/sbin/prepare-vcha", line 449, in setupVchaEthCfg
selfFailoverIp = getIp.getIpPrfxForIface('eth0')
File "/usr/lib/vmware-vcha/scripts/getIp.py", line 64, in getIpPrfxForIface
ifaceInfo = ifaces.getIfaceInfo(iface)
File "/usr/lib/vmware-vcha/scripts/ifaces.py", line 164, in getIfaceInfo
vchaIp, vchaFqdn = iputil.getIpFqdnForEth0(skipResolveOpt)
File "/usr/lib/vmware-vcha/scripts/iputil.py", line 200, in getIpFqdnForEth0
raise Exception('Unable to get hostname resolved IP address for eth0')
Exception: Unable to get hostname resolved IP address for eth0

Try testing that the DNS server is setup to allow TCP connections.
/usr/bin/host -v -W 30 -T <ip of DNS>

if not you can change the way that the iputil.py script runs so that it will use a UDP request.  DNS, by default is setup to answer to UDP requests and most firewall requests for DNS traffic assume that UDP will be used.

Edit the file iputil.py located at /usr/lib/vmware-vcha/scripts/iputil.py

fqdnCmd = [ '/usr/bin/host', '-W', '30', '-T', ip ]
fqdnCmd = [ '/usr/bin/host', '-W', '30', ip ]

Keep the conversation going on Twitter!

Reply with Twitter