vCenter: Cluster Skip Quickstart Workflow via API
Summary:
Basically, whenever you reset vCenter, you might end up w/ a warning on a cluster running vSAN that's just annoying. To circumvent, this from alerting, you need to disable quickstart. Easy enough via UI, but API is a little weird here.
Details:
For one, code capture doesn't seem to understand this. So no help there unfortunately. Secondly, nothing named "quickstart" is in the API, so made this somewhat annoying to try and find. Seems like someone had this question on the VMware communities forum 2 years ago w/ no answer. Someone asked me internally, so I had to dig into it.
Basically, two things:
- You can create a cluster w/ quick start disabled from the get go by passing a false boolean to a parameter named: "InHciWorkflow" via API/PowerCLI call
- Secondly, to "skip QuickStart" on an already created cluster, you can call a method called:
- "AbandonHciWorkflow"
So yeah, you can see how "quickstart" and "HCIWorkflow" SCREAM the same thing...
Code Sample:
Comments
Exception calling "AbandonHciWorkflow" with "0" argument(s): "The operation is not allowed in the current state."
At line:1 char:1
+ $Cluster.ExtensionData.AbandonHciWorkflow()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
any ideas?
Exception calling "AbandonHciWorkflow" with "0" argument(s): "The operation is not allowed in the current state."
At line:1 char:1
+ $Cluster.ExtensionData.AbandonHciWorkflow()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
WorkflowState : done
DvsSetting : {VMware.Vim.ClusterComputeResourceDVSSetting}
ConfiguredHosts : {HostSystem-host-64858}
HostConfigProfile : VMware.Vim.ClusterComputeResourceHostConfigurationProfile
LinkedView :
DvsSetting : {VMware.Vim.ClusterComputeResourceDVSSetting}
ConfiguredHosts : {HostSystem-host-64858}
HostConfigProfile : VMware.Vim.ClusterComputeResourceHostConfigurationProfile
LinkedView :
The error you get is because done is considered a 'terminal state'. Meaning abandonhciworkflow cannot change state from anything other than in_progress.