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

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

book

Article ID: 407502

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

During Host Profile remediation, the operation may fail with the following error in the vSphere Client:

 Error setting advanced options on the host. View the host logs for details.


The /var/run/log/vpxa.log file on the ESXi host may contain entries similar to:

YYYY-MM-DD HH:MM:SS info vpxa[2100738] [Originator@6876 sub=Default opID=#######-######-auto-#####-h5:########-##-##-##] [VpxLRO] -- ERROR task-2 -- 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"
--> }
--> Args:


The /var/run/log/hostd.log file on the ESXi host may contain entries similar to:

YYYY-MM-DD HH:MM:SS info hostd[2101049] [Originator@6876 sub=Solo.Vmomi opID=#######-######-auto-#####-h5:########-##-##-## user=vpxuser] Throw vim.fault.UserNotFound
YYYY-MM-DD HH:MM:SS info hostd[2101049] [Originator@6876 sub=Solo.Vmomi opID=#######-######-auto-#####-h5:########-##-##-## user=vpxuser] Result:
--> (vim.fault.UserNotFound) {
-->    principal = "localroot",
-->    unresolved = false,
-->    msg = "",
--> }

Environment

  • VMware vSphere ESXi 7.x

  • VMware vSphere ESXi 8.x

  • VMware vCenter Server 7.x

  • VMware vCenter Server 8.x

Cause

This issue occurs when the ESXi host is missing the localroot user account, but the Host Profile being applied contains a reference to it.
This can occur after reimaging a host or when certain user accounts are not restored during the rebuild.

Resolution

To resolve this issue, create the missing localroot user account on the ESXi host.

Option 1 – Using the ESXi CLI

  1. SSH to the ESXi host.

  2. Run the following command, replacing <username> and <password> with the appropriate values:

     
    esxcli system account add --id <username> --password <password> --password-confirmation <password>

Option 2 – Using the ESXi Host Client

  1. Log in to the ESXi Host Client.

  2. Navigate to Manage > Security & Users > Users.

  3. Click Add user.

  4. In the Add a user dialog:

    • Enter the missing username, for example: localroot

    • Enter a password for the user.

    • Select Enable Shell Access if required.

  5. Click Add.

Additional Information

Impact/Risk

  • If the missing user is not created, Host Profile remediation will continue to fail for the affected host.
  • Ensure that the Host Profile is updated after making the change to maintain a consistent configuration across all hosts in the cluster.

  • For more information on managing ESXi user accounts, refer to VMware documentation:Manage Users with the VMware Host Client