I'm using Set-Cluster to create the cluster image for remediation.
Get-Cluster -Name $CLUSTER |Set-Cluster -BaseImage $baseImage -VendorAddOn $vendor -Package $fwAddon -Confirm:$false
But sometimes, the vendor addon may not be compatible with the base image I have chosen, and hence I want to check with the next addon available. But on the second try, Im getting the error
com.vmware.vapi.std.errors.already_exists {'messages': [com.vmware.vapi.std.localizable_message {'id': com.vmware.vcIntegrity.lifecycle.drafts.AlreadyExists, 'default_message': Record already exists., 'args': [], 'params': , 'localized': Record already exists.}]
How to clear the draft before I can retry?
Try the Invoke-DeleteHostDraftSoftwareAddOn cmdlet, which is the generated cmdlet for the Delete Clusters Software Drafts Software Add On REST API method.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
But as I created it through Set-Cluster I don't have a valid value for draft. Where we can find the associated drafts for the cluster?
Try the Invoke-GetHostDraftSoftwareAddOn cmdlet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
But for that as well draft is a required parameter
I tried using Invoke-ListClusterSoftwareDrafts to get drafts, but I'm getting the error even though the cluster name is valid.
Invoke-vSphereApiClient : InvocationException: [NOT_FOUND]
Entity '<clustername>' does not exist or is not of type 'cluster'.
---> System.Net.WebException: The remote server returned an error: (404) Not Found.
I also had the occasional issue with these generated cmdlets.
And the Help for these cmdlets is minimal I'm afraid.
But since they are part of the official PowerCLI distribution you should be able to open an SR.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you ever find a solution for this? I have the exact same error 😞