Trouble Updating Cluster Firmware with PowerCLI

0
15
Asked By TechWizard123 On

Hey everyone, I'm trying to use PowerCLI to set the image on my cluster, and while I can successfully set the ESXi version, vendor add-ons, and components, I'm hitting a wall with the firmware update. When I attempt to do this, I get a generic error stating that the update operation for my cluster has failed.

I thought I was doing everything right: I set the value in the GUI, then fetched it using `Get-LcmImage -Type Package`, and stored it in a variable. However, when I pass that same variable to `Set-Cluster -Cluster xxxx -FirmwareAddon $Var`, it fails. Can anyone suggest a workaround? I've searched a lot but haven't found anything helpful.

Here's the relevant code:

```powershell
$Packages = Get-LcmImage -Type Package
$ToAdd = $Packages | Where-Object { $_.Name -eq 'CR-3.2(2b)' }
Set-Cluster -Cluster $ClusterName -FirmwareAddon $ToAdd
```

Also, I checked the type of my `$ToAdd` variable and it seems to be fine:

```powershell
$ToAdd | gm
```
And here's the error I'm receiving:
```
Set-Cluster: Update operation for cluster 'Cluster_XXXX' failed.
```
Has anyone experienced this before? Let me know if you need more info!

3 Answers

Answered By PowerShellPro45 On

It could also be worth checking if your PowerCLI is fully updated. I remember when PowerCLI didn’t support PowerShell 7, but that has changed. You should be good to go with PowerShell 7.4 or later. In fact, I’ve been using it for years without issues. Just make sure you’re on a supported version to avoid these pitfalls.

Answered By ScripterNinja82 On

Have you checked which versions of vSphere and PowerCLI you’re using? Sometimes, a mismatch can cause this kind of issue. I recommend looking into the compatibility matrix at Broadcom's site to see if there might be an issue there. If you find that the versions aren’t compatible, uninstall your current PowerCLI with:
```powershell
Get-Module -Name VMware* -ListAvailable | Uninstall-Module -Force
```
Then you can install a compatible version using:
```powershell
Install-Module -Name VMware.PowerCLI -AllowClobber -RequiredVersion 12.3.0 -Force -SkipPublisherCheck -Confirm:$False
```

Answered By VMwareGuru99 On

You mentioned using VCF.PowerCLI version 9.0.0.24798382. Just be aware that not all versions are created equal. If you're still facing compatibility issues, it might be useful to reference that compatibility matrix again, but it sounds like you might already be okay based on your ESX setup.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.