You can use the vcenter deployment API to run the install stage 2 process of your vCenter Server Appliance and Platform Services Controller appliance.
Install Workflow and Install Stage 2 Workflow show example install workflows.
During stage 1, the appliance is in a NOT_INITIALIZED state. After a successful deployment, the appliance enters in an INITIALIZED state. If there are errors during stage 1, the appliance stays in a NOT_INITIALIZED state and you must redeploy it.
You can check the state of the appliance before, during, and after the setup process. You can run the install stage 2 process if the appliance is initialized. You can check the setup configuration before you initiate stage 2 by running the appliance pre-checks. If errors or warnings appear during the validation of the install specification, you must remove the causes and correct the specification.
During the setup process, the regular appliance state is CONFIG_IN_PROGRESS. The appliance can also enter in a FAILED or QUESTION_RASED state. If a question appears during the setup, the appliance enters in a QUESTION_RAISED state and stays in it until you provide an answer. You can set questions to receive automatic answers in the install spec and if a question is raised during the setup process, the default answer value is automatically provided as the answer to the question.
If errors occur during the setup process, the appliance enters in a FAILED state and you must restart the setup after the causes are removed. If the setup is successful, the appliance enters in a CONFIGURED state.
For information about the states of the appliance and available operations, see Setting Up a Newly Installed Appliance.
You can run the setup pre-checks and the install stage 2 process by creating and passing an InstallSpec. In InstallSpec, you define the setup configuration. See Install Stage 2 Workflow and InstallSpec Python Class Diagram. You can run the setup in silent mode by setting the InstallSpec.auto_answer to true. The default value of InstallSpec.auto_answer is false and the setup is in interactive mode, in which you must provide answers to the raised questions.
If you set up a vCenter Server Appliance with an embedded Platform Services Controller, you must create a VcsaEmbeddedSpec and include it in the InstallSpec. You can optionally include StandaloneSpec and ReplicatedSpec in the VcsaEmbeddedSpec.
If you set up a vCenter Server Appliance with an external Platform Services Controller, you must create a RemotePscSpec and include it in the InstallSpec.
If you set up a Platform Services Controller appliance, you must create a PscSpec. You can optionally include StandalonePscSpec and ReplicatedPscSpec in the PscSpec.
InstallSpec Python Class Diagram shows the classes that you can use to complete stage 2.
For information about the classes, variables, and default values, see the API Reference documentation.