Configure Replication

Configure Replication

Use this workflow to configure a replication.


1. Search for VMs that are suitable for a replication.
GET /{pairing_id}/vcenters/{vcenter_id}/vms
 - Query parameter suitable_for_replication should be true
2. Choose VMs.
3. For each VM, get disks:
GET /{pairing_id}/vcenters/{vcenter_id}/vms/{vm_id}/disks
4. Optionally, for each VM, check capabilities if replication is supported and what are the supported replication settings:
GET /{pairing_id}/vcenters/{vcenter_id}/vms/{vm_id}/capability
5. Request storage policies at the target vCenter Server:
GET /{pairing_id}/vcenters/{vcenter_id}/storage-policies
6. Choose a storage policy. If default storage policy will be used, then set destination_storage_policy_id in the resulting ConfigureReplicationSpec to null.
7. Search for possible target datastores at the target vCenter Server:
GET /{pairing_id}/vcenters/{vcenter_id}/datastores
8. Choose a target datastore.
9. Optionally check the selected target datastore's compliance against the selected target storage policy.
POST /{pairing_id}/vcenters/{vcenter_id}/storage-policies/{storage_policy_id}/actions/check-compliance
 - Pass the chosen datastore IDs as a body to the endpoint
10. Optionally search for seeds at the target vCenter Server for the chosen target datastore from step 8:
 a. POST /{pairing_id}/vcenters/{vcenter_id}/datastores/{datastore_id}/actions/find-seeds
 - Pass spec based on the VM disks retrieved in step 3
 b. Or browse the datastore to select manually seed folder/file
POST /{pairing_id}/vcenters/{vcenter_id}/datastores/{datastore_id}/actions/browse
 - Pass spec for specific type and path of files/folders
11. Construct ConfigureReplicationSpec.
12. Create a replication.
POST /{pairing_id}/replications

Request
URI
POST
https://{api_host}/pairings/{pairing_id}/replications
COPY
Path Parameters
string
pairing_id
Required

The ID of the pairing between this vSphere Replication server and the remote one.


Request Body

List of replication settings to replicate VMs.

Array of ConfigureReplicationSpec of type(s) application/json
Optional
[
    {
        "quiesce_enabled": false,
        "rpo": 0,
        "network_compression_enabled": false,
        "mpit_enabled": false,
        "mpit_instances": 0,
        "mpit_days": 0,
        "auto_replicate_new_disks": false,
        "target_replication_server_id": "HmsRemoteHbrServer:HBRSRV-1924009b-0562-433d-8db9-082141ac04cd:067878e6-2ff0-41eb-928c-5e91492a7b29",
        "lwd_encryption_enabled": false,
        "vm_data_sets_replication_enabled": false,
        "disks": [
            {
                "vm_disk": {
                    "vm_id": "VirtualMachine:vm-80:e594ad24-5f75-41e3-a276-88a2116dbed0",
                    "device_key": 0,
                    "is_vm_home": false,
                    "encrypted": false,
                    "capacity": 0,
                    "source_disk_format": "string",
                    "source_path": {
                        "datastore_id": "Datastore:datastore-16:ff4a23e7-2fed-4be0-be39-479ae372badd",
                        "datastore_name": "local-datastore",
                        "path": "/path/to/folder",
                        "filename": "vmDisk1.vmdk"
                    },
                    "source_storage_policy_name": "string",
                    "source_storage_policy_id": "dsbrowser.defaultStoragePolicy",
                    "label": "string",
                    "controller_key": 0,
                    "controller_label": "string",
                    "supported_for_replication": false
                },
                "enabled_for_replication": false,
                "use_seeds": false,
                "destination_storage_policy_id": "dsbrowser.defaultStoragePolicy",
                "destination_path": "my_vm_seeds_folder/my_vm_disk_1.vmdk",
                "destination_datastore_id": "Datastore:datastore-16:ff4a23e7-2fed-4be0-be39-479ae372badd",
                "destination_disk_format": "string"
            }
        ],
        "target_vc_id": "ff4a23e7-2fed-4be0-be39-479ae372badd",
        "vm_id": "VirtualMachine:vm-80:e594ad24-5f75-41e3-a276-88a2116dbed0"
    }
]
Authentication
This operation uses the following authentication methods.
Responses
202

Configure replication tasks.

Returns TaskDrResponseList of type(s) application/json
{
    "list": [
        {
            "id": "string",
            "description": "string",
            "description_id": "string",
            "entity": "string",
            "entity_name": "string",
            "status": "string",
            "error": {
                "message": "string",
                "details": "string"
            },
            "progress": 0,
            "queued_time": 0,
            "start_time": 0,
            "complete_time": 0
        }
    ],
    "_meta": {
        "errors": [
            {
                "code": "string",
                "message": "string",
                "field": "string"
            }
        ],
        "total": 0,
        "offset": 0,
        "limit": 0,
        "links": {
            "next": {
                "href": "string"
            },
            "self": {
                "href": "string"
            },
            "previous": {
                "href": "string"
            }
        }
    }
}
array of Task
list
Optional

list

_meta
Optional

_meta


400

Bad request - the server could not understand the request due to invalid syntax or invalid request body content

Returns ResponseError of type(s) application/json
{
    "error_code": "string",
    "message": "string",
    "op_id": "string"
}
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.


401

Unauthorized - the client must authenticate itself to get the requested response

Operation doesn't return any data structure

403

Forbidden - not sufficient access rights to fulfill the request

Returns ResponseError of type(s) application/json
{
    "error_code": "string",
    "message": "string",
    "op_id": "string"
}
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.


404

Not Found - server cannot find the requested in URL resource

Operation doesn't return any data structure

500

Internal server error - unexpected condition prevents fulfilling the request

Returns ResponseError of type(s) application/json
{
    "error_code": "string",
    "message": "string",
    "op_id": "string"
}
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.