You can use the API during stage 2 of the vCenter Server instance upgrade.

By using the API, you can upgrade your vCenter Server instance. For information about the upgrade process, its stages, supported configurations, upgrade paths, prerequisites for upgrading, and the sequence for upgrading a vSphere environment, see the vCenter Server Upgrade documentation.

After you deploy the vCenter Server instance on stage 1 by using the GUI or CLI, the instance enters in an INITIALIZED state. If the vCenter Server instance is not initialized, you cannot run stage 2 of the upgrade process. You can get the state of the vCenter Server instance by using the vcenter deployment service. There are six states during the upgrade process.

Figure 1. Upgrade Stage 2 State Diagram
A diagram with the Upgrade Stage 2 states, which are Not_Initialized, Initialized, Config_In_Progress, Failed, Question_Raised, Configured.
Table 1. vCenter Server Instance States During Upgrade Stage 2
State Description
NOT_INITIALIZED The upgrade stage 1 phase is in progress, not started, or failed.
INITIALIZED The vCenter Server instance is deployed and ready for upgrading.
CONFIG_IN_PROGRESS The upgrade process is in progress.
QUESTION_RAISED You must answer the question to continue the upgrade process. The vCenter Server instance stays in the QUESTION_RAISED state until it receives the correct answer.
FAILED Errors appeared during the upgrade process. You can check the errors, warnings, and info data structures.
CONFIGURED The vCenter Server instance is upgraded or configured successfully.

FAILED and CONFIGURED are final states.

You can roll back a vCenter Server instance upgrade by using the GUI. For information about how to roll back a vCenter Server instance, see the vCenter Server Upgrade documentation.

After the upgrade, you can check the vCenter Server instance type, domain registration, services, their state and health status by using the API. For information about how to verify whether the upgrade of your vCenter Server instance is successful, see the vCenter Server Upgrade documentation.

User Operations shows operations that you can perform to upgrade your vCenter Server instance.

Table 2. User Operations
Operation Description
Operations for upgrading
Get the state of the vCenter Server instance

You can get the state of the vCenter Serverinstance before, during and after the upgrade process.

For information about the HTTP requests for diagnostic and deferring the transfer of historical data, see HTTP Requests for Upgrade Stage 2.

Check

You can validate the upgrade spec before you run the upgrade process. If the vCenter Server instance is in the INITIALIZED state, you can run the validation. The operation runs upgrade pre-checks. You can check the errors, warnings, and status data structures before you run the upgrade process.

For information about the HTTP requests for upgrading, see HTTP Requests for Upgrade Stage 2.

Start

If the vCenter Server instance is in an INITIALIZED state, you can run the upgrade process. If errors appear during the upgrade, you can download the vCenter Server support bundle.

For information about the HTTP requests for upgrading, see HTTP Requests for Upgrade Stage 2.

Get

If the vCenter Server instance is in a CONFIGURED state, you can get the spec that is used for upgrading.

For information about the HTTP requests for upgrading, see HTTP Requests for Upgrade Stage 2.

Operations for getting and answering a question
Get

You can get the raised question. If you set the Upgrade.auto_answer to true, the upgrade process will be in a silent mode and the vCenter Serverinstance does not generate questions. It uses default answers and you should not provide an answer.

For information about the HTTP requests for getting and answering a question, see HTTP Requests for Upgrade Stage 2.

Answer

You can provide an answer to the raised question. The available answers for the upgrading are OK, CANCEL, YES, NO, ABORT, RETRY, and IGNORE. The answer depends on the type of the question. If you set the Upgrade.auto_answer to true, the upgrade process will be in a silent mode and the vCenter Serverinstance does not generate questions. It uses default answers and you should not provide an answer.

For information about the HTTP requests for getting and answering a question, see HTTP Requests for Upgrade Stage 2.

For information about the available operations in the API, see the vcenter deployment, vcenter deployment upgrade, vcenter services, and vcenter system-config deployment type services in the API reference documentation.

You can upgrade your vCenter Server instance by using HTTP requests. For information about the HTTP requests, see HTTP Requests for Upgrade Stage 2.