Host profile status displays as "Not Compliant" after clicking REMEDIATE on an ESXi 7.x host with a custom Syslog.global.logDir path
search cancel

Host profile status displays as "Not Compliant" after clicking REMEDIATE on an ESXi 7.x host with a custom Syslog.global.logDir path

book

Article ID: 321001

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

On an stateful and stateless ESXi 7.x host that has Syslog.global.logDir configured with a custom path other than the default [] /scratch/logs, after clicking on the REMEDIATE button in the CONFIGURE > Host Profile option, you see these symptoms:

  • Host profile status displays as "Not Compliant" after a reboot. The impacted host prior to the reboot was previously displaying a status of Compliant.
  • In the [] /datastore/log-dir/hostname a duplicate hostname folder exist.
  • In the /var/log/syslog.log of the impacted ESXi host, you see entries similar to:

    [YYYY-MM-DDTHH:MM:SS] Host Profiles[2110285 opID=#######-##-###-#######-##-######]:             value = 'Syslog.global.logDir'                }             ],             message = "Option Syslog.global.logDir doesn't match the specified criteria"          },          expressionName = 'option["key-vim-profile-host-OptionProfile-Syslog_global_logDir"]-optionFixed',          failureValues = (vim.profile.ComplianceResult.ComplianceFailure.ComplianceFailureValues) [             (vim.profile.ComplianceResult.ComplianceFailure.ComplianceFailureValues) {                dynamicType = <unset>,                dynamicProperty = (vmodl.DynamicProperty) [],                comparisonIdentifier = 'Value-[Syslog.global.logDir]',                profileInstance = <unset>,                hostValue = '[Datastore] scratch/hostname,                profileValue = '[Datastore] scratch'             }          ]       }    ] }
     
  • In the /var/log/vmware/vpxd/vpxd.log, you see entries similar to:

    [YYYY-MM-DDTHH:MM:SS] info vpxd[10312] [Originator@6876 sub=moHostProfile opID=#######-##] [CheckCompliance]: Host Hostname is not compliant with profile HostProfileName: (vim.profile.ComplianceResult.ComplianceFail
    ure) [
    -->    (vim.profile.ComplianceResult.ComplianceFailure) {
    -->       failureType = "Option.Mismatch",
    -->       message = (vmodl.LocalizableMessage) {
    -->          key = "com.vmware.vim.profile.ComplianceFailure.Option.Mismatch.label",
    -->          arg = (vmodl.KeyAnyValue) [
    -->             (vmodl.KeyAnyValue) {
    -->                key = "key",
    -->                value = "Syslog.global.logDir"
    -->             }
    -->          ],
    -->          message = "Option Syslog.global.logDir doesn't match the specified criteria"
    -->       },
    -->       expressionName = "option["key-vim-profile-host-OptionProfile-Syslog_global_logDir"]-optionFixed",
    -->       failureValues = (vim.profile.ComplianceResult.ComplianceFailure.ComplianceFailureValues) [
    -->          (vim.profile.ComplianceResult.ComplianceFailure.ComplianceFailureValues) {
    -->             comparisonIdentifier = "Value-[Syslog.global.logDir]",
    -->             profileInstance = <unset>,
    -->             hostValue = "[Datastore] logs/hostname",
    -->             profileValue = "[Datastore] logs"
    -->          }
    -->       ]
    -->    }
    --> ]


    For additional information, see Location of vCenter Server log files (1021804) .



Environment

VMware vSphere ESXI 7.0.x

Cause

This issue occurs due to a race condition on the impacted ESXi host that are attach to a Host Profile.

Resolution

This is a known issue in VMware ESXi 7.x and has been resolved in ESXi 7.0.3 P08.

After upgrading an ESXi host to 7.0 Update 3c or later, if the syslog.global.logDir setting is modified while syslog.global.logDirUnique is enabled, two levels of <hostname> subdirectories might be created under the specified log directory path. The syslog.global.logDirUnique parameter ensures unique log locations when multiple ESXi hosts share the same NFS directory for syslog.global.logDir by creating a subdirectory named after the ESXi host.