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:

  1. 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
  2. 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

Unknown said…
This is not working for me:

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?
Unknown said…
This is not working for me, 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
Zsoldier said…
It likely means that the quickstart is already disabled on the cluster. If you output $cluster.extensiondata.hciconfig, that'll give you an idea what state it's complaining about. 'invalid' workflow state means it's been skipped. If enabled, you should see something like in_progress.
Unknown said…
This is what I get:

WorkflowState : done
DvsSetting : {VMware.Vim.ClusterComputeResourceDVSSetting}
ConfiguredHosts : {HostSystem-host-64858}
HostConfigProfile : VMware.Vim.ClusterComputeResourceHostConfigurationProfile
LinkedView :
Unknown said…
WorkflowState : done
DvsSetting : {VMware.Vim.ClusterComputeResourceDVSSetting}
ConfiguredHosts : {HostSystem-host-64858}
HostConfigProfile : VMware.Vim.ClusterComputeResourceHostConfigurationProfile
LinkedView :
Zsoldier said…
done seems to be equivalent to invalid. invalid being, "skipped", done likely means completed via traditional methods. https://vdc-repo.vmware.com/vmwb-repository/dcr-public/97e6db01-d441-472e-ad53-b48c2bb0e1e4/45347fb1-052d-44b7-b3e9-cbefc34488e3/SDK/vsphere-ws/docs/ReferenceGuide/vim.ClusterComputeResource.HCIWorkflowState.html

The error you get is because done is considered a 'terminal state'. Meaning abandonhciworkflow cannot change state from anything other than in_progress.

Popular posts from this blog

NSX-T: Release associated invalid node ID from certificate

NSX-T: vCenter and NSX-T Inventory out of Sync (Hosts in vSphere not showing up in NSX-T)

MacOS: AnyConnect VPN client was unable to successfully verify the IP forwarding table modifications.