Revert to a Product Snapshot

You can use the
VMware Aria Suite Lifecycle
API to revert your
VMware Aria Suite
product to a snapshot created using
VMware Aria Suite Lifecycle
. Reverting to a snapshot restores the product to a former state.
For example, if a product upgrade fails, you can revert to a snapshot of the product that you created before attempting the upgrade.
The following procedure shows how to revert to a snapshot for
VMware Aria Operations
.
  1. Assign the snapshot ID variable.
    snapshotId = '<
    your_snapshot_ID
    >'
  2. Revert
    VMware Aria Operations
    to
    your_snapshot_ID
    . For a snapshot that was taken without memory, set
    "powerOn": true
    to power on the virtual appliance and restore the disk to its initial state.
    curl -X POST \ '$url/lcm/lcops/api/environments/$environmentId/products/$productId/snapshot/inventory/revert' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ -d '{ "powerOn": true, "productSnapshotId": "'$snapshotId'" }' | jq "."
    To revert to a snapshot of
    VMware Aria Automation Config
    , include the tenant ID as a query parameter in your request, for example:
    curl -X POST \ '$url/lcm/lcops/api/environments/$environmentId/products/$productId/snapshot/inventory/revert?tenantId=$tenantId' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ -d '{ "powerOn": "true", "productSnapshotId": "'$snapshotId'" }' | jq "."
    The request triggers the API. The response shows the request ID.
    { "requestId":"a3f77209-0005-44b3-9eb5-ac1a1ba19394" }
  3. Assign the variable for the
    requestId
    .
    requestId = "a3f77209-0005-44b3-9eb5-ac1a1ba19394"
  4. Use the
    requestId
    to track your request.
    curl -X GET '$url /lcm/request/api/v2/requests/$requestId' -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' | jq "."
    After the request succeeds,
    VMware Aria Suite Lifecycle
    has restored
    VMware Aria Operations
    to the state and configuration defined in the snapshot.
    ... }, "outputMap": {}, "state": "COMPLETED", "executionId": "59430b9d-44cc-47a1-90ec-777481edb9z9", ...
    On
    Manage Snapshot
    in the
    VMware Aria Suite Lifecycle
    product UI, a
    You are here
    marker shows the snapshot to which the product was reverted.