Unconfiguring replication using Postman API does not retain replica disks
search cancel

Unconfiguring replication using Postman API does not retain replica disks

book

Article ID: 376074

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

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:

POST https://vrms.xx.com/api/rest/vr/v2/pairings/cb48123e-11bd-3bxx-9xx4-17xx3763xxx4/replications/HmsGroup:GID-f81xxx1b-5xxc-4xx6-9xx2-95exxxa40010:135xx0e5-3xx9-4xx0-9xx7-0c6fdxxxc3ba/actions/unconfigure

{
"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
}

Environment

vSphere Replication 8.7
vCenter Server 7.0.3
VMware ESXi 7.0.3

Cause

Incorrect json file collection can lead to such errors. 

Resolution

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. 

Attachments

Configure Replication Env.postman_environment.json get_app
Configure Replication.postman_collection.json get_app