Apply a system patch

You can use the API to apply a system patch on
VMware Aria Suite Lifecycle
.
To apply a system patch that patches
VMware Aria Suite Lifecycle
, you first create a snapshot of the current
VMware Aria Suite Lifecycle
appliance. Then you obtain the system patch ID and apply the patch.
  1. Log in to the
    vCenter
    to take a snapshot of the
    VMware Aria Suite Lifecycle
    appliance. You can use this snapshot to perform a rollback if a failure occurs during patching.
  2. List the patches.
    curl -X GET \ '$url/lcm/lcops/api/v2/settings/patch-binaries' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' | jq "."
    Check the response to find a system patch that is downloaded and available to apply. A snippet of the response shows the patch ID and
    "patchDownloadStatus": "DOWNLOAD"
    .
    ... "patchInfo": { "name": "vRealize Lifecycle Manager, version 8.4.0 - HF1", "summary": "vRealize Lifecycle Manager, version 8.4.0 - HF1 Patch", "description": "vRealize Lifecycle Manager, version 8.4.0 - HF1 Patch", "kbUrl": "https://kb.vmware.com/s/article/76805", "eulaFile": null, "category": "bugfix", "urgency": "critical", "releaseType": "patch", "releaseDate": 1590039695062, "additionaInfo": {} }, "metadataId": "vrlcm-8.4.0-HF1", "metadataVersion": "1", "patchId": "d5b90274-3906-43b8-8eb3-7f73e76c2iu9", "patchBundleCreationDate": 1590039921132, "selfPatch": false, "product": { "productId": "vrlcm", "productName": "vRealize Lifecycle Manager", "productVersion": "8.4.0", "supportedVersions": [ "8.4.0" ], ... }, "patchFileName": "vrlcm-8.4.0-HF1.patch", "patchSize": 6073307467, "patchSha256sum": "9fed5f30f7c2967cdaac3b914a49b3aaec6520c4er422b90cd5703f9794e5", "patchRunningcounter": 1, "patchStatus": "ACTIVE", "patchDownloadStatus": "DOWNLOAD", "extract": false, "patchCounter": "1" ...
  3. Assign the patch ID variable for the system patch.
    syspatchId = "d5b90274-3906-43b8-8eb3-7f73e76c2iu9"
  4. Apply the system patch.
    curl -X POST \ '$url/lcm/lcops/api/v2/system-patch/$syspatchId' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ | jq "."
    The request triggers the API. The response shows the request ID.
    { "requestId":"poiu5678a-6e1f-4772-a97d-af300ad8888c" }
  5. Assign the request ID variable.
    requestId = "poiu5678a-6e1f-4772-a97d-af300ad8888c"
  6. VMware Aria Suite Lifecycle
    services are not reachable while the patch is applied, so wait approximately ten minutes before polling the request.
    curl -X GET '$url /lcm/request/api/v2/requests/$requestId' -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' | jq "."
    After completion, the system patch is applied.
    ... }, "outputMap": {}, "state": "COMPLETED", "executionId": "94301f3c-20cc-47a1-90ec-130635edb7d1", ...