VMware Cloud Community
vGuy
Expert
Expert

vSphere Lifecycle Manager remediation using PowerCLI

Receiving Cannot bind parameter VendorAddOn error when trying to attach vendor AddOn to an LCM image. Does anyone have an exact syntax to attach a vendor AddOn? Need to attach - HPE Customization for HPE Servers version 701.0.0.10.7.0-71
 
Thanks!
0 Kudos
2 Replies
vGuy
Expert
Expert

This is the error:

============================================

 

$UpdateLcmImage= Get-LcmImage -Version "$Baseimage" Get-Cluster -Name "$ClusterName" |Set-Cluster -BaseImage $UpdatelcmImage -VendorAddOn 701.0.0.10.7.0-71 -Confirm:$false Get-LcmImage : 5/28/2021 10:27:34 AM Get-LcmImage One or more errors occurred. At line:1 char:18 + $UpdateLcmImage= Get-LcmImage -Version "$Baseimage" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-LcmImage], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Lcm.GetLcmImage Set-Cluster : Cannot bind parameter 'VendorAddOn'. Cannot convert the "701.0.0.10.7.0-71" value of type "System.String" to type "VMware.VimAutomation.ViCore.Types.V1.Lcm.AddOn". At line:2 char:87 + ... ter -BaseImage $UpdatelcmImage -VendorAddOn 701.0.0.10.7.0-71 -Confir ... + ~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Set-Cluster], ParameterBindingException + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,VMware.VimAutomation.ViCore.Cmdlets.Commands.SetCluster
 
============================================
0 Kudos
LucD
Leadership
Leadership

The value on the VendorAddon parameter for the Set-Cluster cmdlet needs to be an LCMImage (returned by Get-LcmImage) of type VendorAddOn.
Not a string.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos