We're using Autodeploy for our ESXi environment and after building a new image for a host, you always run a Test-DeployRuleSetCompliance followed by Repair-DeployRuleSetCompliance. Strange this is that I noticed that running this from our management server gives errors and running it from the vCenter Server itself it runs fine.
PS C:\> Get-VMHost -Name vcdvm208.mydomain.com | Test-DeployRuleSetCompliance | Repair-DeployRuleSetCompliance
Repair-DeployRuleSetCompliance : 14-10-2015 08:11:10 Repair-DeployRuleSetCompliance Host is already associated with another PXE profile
At line:1 char:78
+ Get-VMHost -Name vcdvm208.mydomain.com | Test-DeployRuleSetCompliance | Rep ...
+ CategoryInfo : NotSpecified: (:) [Repair-DeployRuleSetCompliance], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.DeployAutomation.Commands.RepairDeployRuleSetCompliance
PowerCLI C:\Windows\system32> Get-VMHost -Name vcdvm208.mydomain.com | Test-DeployRuleSetCompliance | Repair-DeployRuleSetCompliance
Warning: Image Profile ESXi-5.1.0-20140102001-std-fusion-fnic contains one or more software packages that are not stateless-ready. You may experience problems when...
Warning: Image Profile ESXi-5.5-3-3116895-v001 contains one or more software packages that are not stateless-ready. You may experience problems when using this .....
(The warning messages are as expected and fine).
The output of $PSVersionTable is the same on both systems. On the Management Server we have recently installed VMware PowerCLI 6.x (220.127.116.1195) and the vCenter Server is locally still running VMware PowerCLI 5.1 SP1.
The version difference, should not however result in such a difference of a normal command, should it?
It is a vCenter install on windows.
Version 5.5 Update 2d
We run autodeploy on a seperate server.
And running the PowerCLi cmdlets from my laptop.
When I use the PowerCLi 5.8 (from a mgmt server) I did get warnings about vibs not ready for stateless caching.... but the repair-deployrulesetcompliance cmdlet worked.
I did see this problem before... but due to other time constrains didn't pay attention to it.
I removed a deployrule from the active set that pinnend a certain image to a specific host.
My deployruleset consists of three rules, one for the image, one for the cluster and one for the hostprofile.
Due to patching issues, I introduced a new rule to have one vmhost with a specific image... this rule was placed at index 0.
Today I removed that rule from the active ruleset.... and tried to repair the compliance for that host.
Which resulted in the given error. (using PowerCLI 6.0 R2)
btw. Laptop is windows 7
and mgmt server is windows 2012 R2
I have almost the same configuration. vCenter 5.5U2 on Windows. Auto Deploy also on that same server.
PowerCLI 6.x on management server
PowerCLI 5.x on vCenter Server.
We are seeing the same issue, however I cannot test from the vCenter Server because we are running VCSA (version 5.5U3a - build 3142196). This is also our auto-deploy server.
The only workaround we've found to boot hosts with a newer image is to remove them from vCenter entirely. If there is a better way to update Auto Deploy hosts with a newer build, please share!
I have the same problem with vSphere 5.1 U3 and PowerCLI 6.0 R2.
The only way to fix this and apply another ESXi Image Profile is with Apply-ESXImageProfile
Apply-ESXImageProfile -ImageProfile <Image Profile> -Entities <Hostname>,<Hostname>
Get-Cluster <Cluster Name> | Get-VMHost | Test-DeployRuleSetCompliance | Repair-DeployRuleSetCompliance
and check again
Get-Cluster <Cluster Name> | Get-VMHost | Test-DeployRuleSetCompliance
this worked for me.
Has someone already filed a support request which I could refer to?
I have also experienced this error recently, like this week.
We're running VCSA 5.5 Update 3c, and systematically upgrading our stateless ESXi hosts from 5.5 Update 2 to 5.5 Update 3b + assorted patches (20160204001).
The workaround is as rsteiner99 mentioned. Here's a slightly easier way to apply this to all hosts in a cluster:
$cluster = Get-Cluster <clustername>
Apply-ESXImageProfile -ImageProfile <profile> -Entities ($cluster | Get-VMHost)
$cluster | Get-VMHost | Test-DeployRuleSetCompliance
FYI, looking at the product interoperability matrix, it clearly states that working on either vCenter 5.5 Update 3 or ESXi 5.5 Update 3 will require PowerCLI 6.0 or 6.3:
I'm running PowerCLI 6.3 Release 1, which exhibits the original error reported in the beginning of this thread.