The first patch for ESXi has been released so I figured this was a great time to create and article around how to patch your Image Profile with a new update. The process is fairly straight forward as in this case you will need to create a new image-profile (described here) and link it to a new rule (New-DeployRule and make that rule active (Add-DeployRule). That is what I like about Stateless. You can just prepare a new Image Profile, create a new rule and you are good to go. A reboot of your ESXi host will load up the latest Image Profile. I did this within a couple of minutes and I’m now running build 474610 of ESXi.
While I was playing around I decided to do things in an incorrect order to see if I could break it, and of course I did manage to break it… I managed to fix all of it though. The first thing I did was testing the rule set and repairing it as documented below.
Now if you run into any issues you can repair the ruleset by using the following command:
Get-VMHost <esxi host> | Test-DeployRuleSetCompliance | Repair-DeployRuleSetCompliance
Now if your host boots and mentions that there’s no rule associated you might want to try the following:
If your newly created rule is returned you will want to make sure it is active:
If there’s nothing listed it means no rules are currently active (active ruleset is what the documentation will refer to). You you can set the rule as active as follows:
Set-DeployRuleSet -DeployRule <name of rule>
Everyone who is considering using Auto-Deploy I would most definitely recommend to explore these commands and to try to break things and fix it. Document your steps along the way, I am certain it will be valuable at some point!
You say: “You can just prepare a new Image Profile, create a new rule and you are good to go. A reboot of your ESXi host will load up the latest Image Profile”
But on the UPGRADE guide I see “When you add a rule to the Auto Deploy rule set or make changes to one or more rules, unprovisioned hosts that you boot are automatically provisioned according to the new rules. For all other hosts, Auto Deploy applies the new rules only when you test their rule compliance and perform remediation.”
Please help me to understand…
Duncan Epping says
I create a new rule and a new image so I still have the old one may anything go wrong I can revert back.
Both options work,