Applying host profile fails with "Error setting advanced options on the host. View the host logs for details." on ESXi host
search cancel

Applying host profile fails with "Error setting advanced options on the host. View the host logs for details." on ESXi host

book

Article ID: 372348

calendar_today

Updated On: 05-15-2025

Products

VMware vSphere ESXi 8.0 VMware vSphere ESXi 7.0 VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

Symptoms:

  • During host profile remediation, the task fails with the error "Host profile apply failed with error: Error setting advanced options on the host.
  • Log file /var/run/log/hostd.log on ESXi will show similar to the below snippets:

yyyy-mm-ddThh:mm:ss.mssZ error hostd[2100193] [Originator@6876 sub=Hostsvc.SyslogConfigProvider opID=xxx user=vpxuser] Failed to set logger 'hbr-agent' configuration
yyyy-mm-ddThh:mm:ss.mssZ verbose hostd[2100193] [Originator@6876 sub=Solo.Vmomi opID=xxx user=vpxuser] Arg changedValue:
--> (vim.option.OptionValue) [
-->    (vim.option.OptionValue) {
-->       key = "Syslog.loggers.cmmdsd.rotate",
-->       value = 0
-->    },

  • Log file /var/run/log/vpxa.log on ESXi will show similar to the below snippets:

yyyy-mm-ddThh:mm:ss.mssZ info vpxa[2318048] [Originator@6876 sub=Default opID=xxx] [VpxLRO] -- ERROR task-236500 -- HostdHostProfileManager -- vim.profile.host.profileEngine.HostProfileManager.applyHostConfig: vmodl.MethodFault:
--> Result:
--> (vmodl.MethodFault) {
-->    faultCause = (vmodl.MethodFault) null,
-->    faultMessage = (vmodl.LocalizableMessage) [
-->       (vmodl.LocalizableMessage) {
-->          key = "com.vmware.vim.profile.applyHostConfigError.Settings.Advanced.Config",
-->          arg = <unset>,
-->          message = "Error setting advanced options on the host. View the host logs for details."
-->       }
-->    ]
-->    msg = "MethodFault.summary"

Environment

VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x

 

Cause

File "/etc/vmsyslog.conf.d/hbr-agent.conf" has incorrect permissions.

Resolution

Procedure:

  1. Enter Maintenance Mode:

    • Place the host in maintenance mode to prevent disruptions during the configuration changes.
  2. Adjust Sticky Bit File Handling:

    • Temporarily disable the "VisorFSPristineTardisk" setting to enable the replacement of sticky bit files.
    • Execute the following command:
      vsish -e set /config/VisorFS/intOpts/VisorFSPristineTardisk 0
      
  3. Correct File Permissions:

    • Ensure proper file permissions for the '/etc/vmsyslog.conf.d/hbr-agent.conf' file configuration file by executing the following command:
      chmod 1644 /etc/vmsyslog.conf.d/hbr-agent.conf 
      
  4. Configure Syslog for hbr-agent:

    • Configure the syslog settings for the '/etc/vmsyslog.conf.d/hbr-agent.conf' file by executing the following command:
      esxcli system syslog config logger set --id='hbr-agent' --reset='rotate'
      
  5. Revert Sticky Bit File Handling:

    • Revert the "VisorFSPristineTardisk" setting to its original state by executing the following command:
      vsish -e set /config/VisorFS/intOpts/VisorFSPristineTardisk 1