When attempting to apply a host profile that contains NTP settings it fails. Also, manually setting the NTP server on the ESXi host fails with the same error.
ESXi - /var/run/log/vpxa.log:
2025-07-15T20:56:33.997Z Er(163) Vpxa[2099625]: [Originator@6876 sub=Default opID=mce6pozc-4627967-auto-2r72w-h5:70388799-5-01-e4] [VpxLRO] -- ERROR task-3 -- 5287ad1b-d72b-62d8-3cce-82c74994e49e -- HostdHostProfileManager -- vim.profile.host.profileEngine.HostProfileManager.applyHostConfig: :vmodl.MethodFault2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> Result:2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> (vmodl.MethodFault) {2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> faultCause = (vmodl.MethodFault) null,2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> faultMessage = (vmodl.LocalizableMessage) [2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> (vmodl.LocalizableMessage) {2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> key = "com.vmware.vim.profile.engine.UnexpectedError",2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> arg = (vmodl.KeyAnyValue) [2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> (vmodl.KeyAnyValue) {2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> key = "error",2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> value = "cannot access local variable 'ntpState' where it is not associated with a value"2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> },2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> (vmodl.KeyAnyValue) {2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> key = "context",2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> value = "Exception while applying host config"2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> }2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> ],2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> message = "Error: cannot access local variable 'ntpState' where it is not associated with a value."2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> }2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> ]2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> msg = "MethodFault.summary"2025-07-15T20:56:33.997Z Er(163) Vpxa[2099533]: --> }
The above shows that the host is having issues applying the NTP value from the Host Profile.
DNS settings on the host are set incorrectly and the host is unable to resolve the supplied host names for the NTP servers.
Update DNS configuration on the host to make sure that it is working properly.