VMware vSphere Replication (VR), VMware Site Recovery Manager (SRM), and VMware Live Site Recovery (VLSR) appliances are normally upgraded through the Appliance Management Interface on port 5480.
This article describes how to upgrade a VR, SRM, or VLSR appliance from the command line by using the REST API.
VMware vSphere Replication 8.x
VMware Site Recovery Manager 8.x
VMware Live Site Recovery 9.0.x
VMware Live Recovery 9.0.x
VCF Protection and Recovery 9.1.x
Before proceeding, verify that the target version is supported and take a snapshot or backup of the appliance according to the applicable product upgrade documentation.
APPLIANCE_HOSTNAME="<VR_SRM_OR_VLSR_HOSTNAME>"
USERNAME="admin"
PASSWORD="<admin_password>"
SESSION_ID=$(curl -sk -X POST "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/session" -H 'Content-type: application/json' -u "$USERNAME":"$PASSWORD" | python3 -c 'import sys,json; print(json.load(sys.stdin)["session_id"])')echo "$SESSION_ID"curl -k -X GET "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/appliance/update-manager/repository" -H "x-dr-session: $SESSION_ID" -H 'Content-type: application/json'curl -k -X PUT "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/appliance/update-manager/repository" -H "x-dr-session: $SESSION_ID" -H 'Content-type: application/json' -d '{ "mounted_iso": true, "password": "", "url": "", "username": "" }'curl -k -X PUT "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/appliance/update-manager/repository" -H "x-dr-session: $SESSION_ID" -H 'Content-type: application/json' -d '{ "mounted_iso": false, "password": "<password>", "url": "<repository_URL>", "username": "<username>" }'curl -k -X PUT "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/appliance/update-manager/repository" -H "x-dr-session: $SESSION_ID" -H 'Content-type: application/json' -d '{ "mounted_iso": false, "password": "", "url": "<repository_URL>", "username": "" }'update directory from the extracted VR, SRM, or VLSR upgrade ISO. Do not configure the URL to point directly to the ISO file.http://<repository_server>/<path>/updatecurl -k -X POST "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/appliance/update-manager/actions/retrieve-updates" -H "x-dr-session: $SESSION_ID" -H 'Content-type: application/json'{"id":"DrConfigConfigurationTask:DrConfigConfigurationTask1:","description":null,"type":"retrieveUpdate","status":"RUNNING","error":null,"result":null,"progress":0,"start_time":<epoch_time>,"complete_time":null,"_meta":null}DrConfigConfigurationTask:DrConfigConfigurationTask1::) is part of the task ID and must be included in subsequent commands.<TASK_ID> with the task ID returned in Step 5:curl -k -X GET "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/tasks/<TASK_ID>" -H "x-dr-session: $SESSION_ID" | python3 -c 'import sys,json; print(json.load(sys.stdin)["result"][0]["version"])'9.0.2.16600<VERSION> with the version returned in Step 6:curl -k -X POST "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/appliance/update-manager/updates/<VERSION>/actions/install" -H "x-dr-session: $SESSION_ID" -H 'Content-type: application/json'{"id":"DrConfigConfigurationTask:DrConfigConfigurationTask2:","description":"Downloading Appliance Upgrade","type":"installUpdate","status":"RUNNING","error":null,"result":null,"progress":50,"start_time":<epoch_time>,"complete_time":null,"_meta":null}DrConfigConfigurationTask:DrConfigConfigurationTask2::) is part of the task ID.<TASK_ID> with the installation task ID returned in Step 7:curl -k -X GET "https://$APPLIANCE_HOSTNAME/api/rest/configure/v2/tasks/<TASK_ID>" -H "x-dr-session: $SESSION_ID"status
progress
error
descriptionThe REST API used in this article is available under:
/api/rest/configure/v2
The -k curl option disables TLS certificate validation. It is included in these examples for appliances that use self-signed certificates.
When using an HTTP or HTTPS repository, verify that:
update directory extracted from the upgrade ISO.The product name VMware Site Recovery Manager (SRM) applies to the 8.x releases. Starting with version 9.x, the product is named VMware Live Site Recovery (VLSR).