1. Unconfiguring replication using vSphere Replication REST API retains replica disks in the target datastore.
2. Unconfiguring replication using Postman API does not retain replica disks in the target datastore.
Below is the API call error:
{
"retain_replica_disks": true
}
Response:
{
"id": "Task:task-2991198:39083844-5fb6-4547-9f7c-74630f47a413",
"description": "Unconfigure virtual machine replication",
"description_id": "com.vmware.vcHms.UnconfigureReplicationTask",
"entity": "VirtualMachine:vm-1184:39083844-5fb6-4547-9f7c-74630f47a413",
"entity_name": "iaasn00325289",
"status": "RUNNING",
"error": null,
"result": null,
"progress": 0,
"queued_time": 1722022255678,
"start_time": 1722022255691,
"complete_time": null,
"_meta": null
}
Incorrect json file collection can lead to such errors.
Here are the steps to unconfigure replication with retain_replica_disks using Postmaster API
Configure Replication.postman_collection.json and Configure Replication Env.postman_environment.json are used in Postman to demonstrate how to unconfigure a replication. Please ensure the VR pairing has already been created & then proceed with the steps below.
1. Import "Configure Replication.postman_collection.json" and "Configure Replication Env.postman_environment.json" into Postman.
2. Navigate to Environments and set "Configure Replication Env" active.
3. Set the values for "hms_url", "local_vc_passwd" and "remote_vc_passwd" in "Configure Replication Env".
4. Navigate to Collections.
5. Run the login request.
6. Run the get pairing id request. Find pairing id in the response and manually set it as pairing_id in "Configure Replication Env".
7. Run the create remote session request. Verify the status is "204 No Content", indicating success.
8. Run the get replication id request. Find the replication id in the response and manually set it as replication_id in
"Configure Replication Env".
9. Run the get local/remote vc id. Find local vc id and remote vc id in the response and set them as local_vc_id and remote_vc_id in "Configure Replication Env".
10. Run the get local vm request. Find local vm id to be replicated in the response and set it as vm_id in "Configure Replication Env".
11. Run the unconfigure replication request.
These steps will ensure that replica disks are retained in the target datastore.