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.- Verify that all general prerequisites have been satisfied and that you have assigned your environment ID and product ID. See the prerequisites for Performing Day 2 operations usingVMware Aria Suite Lifecycle APIs.
- Verify that you have the ID of the snapshot that you want to revert to. See Create a Product Snapshot.
- If you are reverting to a snapshot ofVMware Aria Automation Config, verify that the tenant ID variable is assigned. See Creating and Managing Product Snapshots.
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
. - Assign the snapshot ID variable.snapshotId = '<your_snapshot_ID>'
- RevertVMware Aria Operationstoyour_snapshot_ID. For a snapshot that was taken without memory, set"powerOn": trueto 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 ofVMware 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" }
- Assign the variable for therequestId.requestId = "a3f77209-0005-44b3-9eb5-ac1a1ba19394"
- Use therequestIdto 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 Lifecyclehas restoredVMware Aria Operationsto the state and configuration defined in the snapshot.
On... }, "outputMap": {}, "state": "COMPLETED", "executionId": "59430b9d-44cc-47a1-90ec-777481edb9z9", ...Manage Snapshotin theVMware Aria Suite Lifecycleproduct UI, aYou are heremarker shows the snapshot to which the product was reverted.