Symptoms:
vSphere HA Host Status error in the host summary
"An error occurred when vCenter Server attempted to initialize the vSphere HA Agent running on the host. This condition is often cleared by reconfiguring vSphere HA for the host. The VMs on the host are not monitored by vSphere HA and thus will not be restarted after a failure."
You have attempted various troubleshooting methods, such as:
<unknownStateMonitorPeriod>30</unknownStateMonitorPeriod>
<unknownStateMonitorPeriod >30</unknownStateMonitorPeriod >
7.0.X
This happens when you previously tried to set an advanced configuration option for vSphere HA and accidentally added an extra space at the end of the setting, which disrupts the fdm.cfg configuration file.
For example, setting the das.config.fdm.policy.unknownStateMonitorPeriod (with an extra space at the end) results in the following line being created in the fdm.cfg file:
<unknownStateMonitorPeriod>30</unknownStateMonitorPeriod>
<unknownStateMonitorPeriod >30</unknownStateMonitorPeriod >
(If you examine it closely, you'll notice that the second line has an extra space after "unknownStateMonitorPeriod," which is causing the issue.)
To address this issue (this needs to be done on all hosts experiencing this problem):
Note: If the vCenter Server is part of a Linked Mode replication group, remember that backups or offline snapshots must be created for each member of the Linked Mode group.
cp /etc/opt/vmware/fdm/fdm.cfg /etc/opt/vmware/fdm/fdm.cfgbk
vi /etc/opt/vmware/fdm/fdm.cfg
<unknownStateMonitorPeriod>30</unknownStateMonitorPeriod>
<unknownStateMonitorPeriod >30</unknownStateMonitorPeriod >
Press ESC
:wq!
Impact/Risks:
vSphere HA will be ineffective on any host where this modification has been applied.