Auto Deploy Host Booting From Wrong Image Profile
search cancel

Auto Deploy Host Booting From Wrong Image Profile

book

Article ID: 403154

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When a new ruleset is applied with a new Image profile (a new ESXi version), the ESXi hosts still boot to the old Image profile (old ESXi version).

Environment

  • vCenter 7.0.x
  • vSphere ESXi 7.0.x

Cause

This situation occurs when you update the active ruleset/create a new ruleset without updating the corresponding host entries in the auto deploy cache. The first time a host boots, the Auto Deploy server parses the host attributes against the active ruleset to determine (1) the image profile to install on the host, (2) the host profile to configure the host, and (3) where in the vCenter inventory to add the host.  This information then gets saved in the auto deploy cache and reused on all future reboots.

With this approach, each host only gets parsed against the active ruleset once (on the initial boot), after which the results get saved and reused on all subsequent reboots.

Resolution

  • Connect to the vCenter using PowerCLI using the below command:
    • Connect-VIServer -Server <vCenter_fqdn>

 

  • When you get the login prompt, log in using the vCenter SSO credentials. 

 

  • Then run the below cmdlet to check the ruleset for the affected host:
    • Test-DeployRuleSetCompliance <esxi_host_fqdn>

 

  • To update the auto deploy cache, run the following cmdlet:
    • Test-DeployRuleSetCompliance <esxi_host_fqdn> | Repair-DeployRuleSetCompliance

 

  • If there are multiple ESXi hosts, you may use the below cmdlet:
    • foreach ($esx in Get-VMHost) {$esx | test-deployrulesetcompliance | Repair-DeployRuleSetCompliance}