If you want to manage the life cycle of a cluster by using a single software specification, you must first enable vSphere Lifecycle Manager on that cluster. You can use the vSphere Automation REST API to enable a cluster to use the vSphere Lifecycle Manager feature.

Before you enable vSphere Lifecycle Manager on a cluster, you can check whether the cluster meets all prerequisites. vSphere Lifecycle Manager can be enabled for a cluster only if the following requirements are met:
  • All hosts in the cluster are of version 7.0 or later.
  • All hosts in the cluster are stateful.
  • All hosts in the cluster include only components that belong to integrated solutions, such as VMware vSAN™ and VMware vSphere® High Availability.
  • None of the hosts in the cluster are in the process of active remediation through the VMware vSphere® Update Manager™.
  • The cluster has a desired state already created for it.

If you want to run a preliminary check about whether all hosts in the cluster meet these requirements, use the POST https://<vcenter_ip_address_or_fqdn>/api/esx/settings/clusters/<cluster_id>/enablement/software?action=check&vmw-task=true request and submit the cluster ID and optionally a Software.CheckSpec JSON object.

The cluster ID represents the unique identifier for a cluster resource. To retrieve a list of clusters available on your vCenter Server instance, use the GET https://<vcenter_ip_address_or_fqdn>/api/vcenter/cluster request and filter the list of clusters by using the query parameters. You receive an array of Cluster.Summary JSON objects that contain the cluster ID among the other commonly used information.

You submit a Software.CheckSpec structure in the request body to specify which checks can be skipped during the cluster preliminary check. Though you can skip some checks with this operation, the Image Manager runs all checks during the enablement operation. If you leave the check specification empty, all checks are run for each host in the cluster. You can select among the following checks to be skipped when running a pre-check operation:
  • SOFTWARE. Checks whether there are any orphaned vSphere Installation Bundles (VIBs) and any software that cannot co-exist with vSphere Lifecycle Manager.
  • VERSION. Checks whether all hosts in the cluster are of version greater than a predefined one.
  • STATELESSNESS. Checks whether there are any stateless hosts in the cluster. vSphere Lifecycle Manager can be enabled only if the cluster does not contain stateless hosts.
  • VUM_REMEDIATION. Checks whether any of the hosts in the cluster are currently remediated through the VMware vSphere® Update Manager™.
  • SOFTWARE_SPECIFICATION_EXISTENCE. Checks whether there is a software specification already associated with this cluster. In case, this check reports that the cluster does not have a software specification, you must first create a draft software specification for this cluster and then commit the draft.
  • VSAN_WITNESS_ELIGIBILITY. Checks whether the software specification can be used on any vSAN witness hosts in the cluster. For information about how you can manage a vSAN cluster by using vSphere Lifecycle Manager, see vSAN Clusters and vSphere Lifecycle Manager chapter in the Managing Host and Cluster Lifecycle documentation.

To enable a cluster to be managed with vSphere Lifecycle Manager, use the PUT https://<vcenter_ip_address_or_fqdn>/api/esx/settings/clusters/<cluster_id>/enablement/software?vmw-task=true request and submit the cluster ID as path parameter. To specify which check can be skipped during the enablement process, submit a Software.EnableSpec JSON object. Currently, you can only skip the software checks.

You can also get information about which clusters in your environment are managed with a single software specification. Use the GET https://<vcenter_ip_address_or_fqdn>/api/esx/settings/clusters/<cluster_id>/enablement/software request and submit the cluster ID as a path parameter.