Configure Replication
DescriptionUse 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
URLURL
Path Parameters
Path Parameters
The ID of the pairing between this vSphere Replication server and the remote one.
Request Body
List of replication settings to replicate VMs.
{
"target_vc_id": "ff4a23e7-2fed-4be0-be39-479ae372badd",
"vm_id": "VirtualMachine:vm-80:e594ad24-5f75-41e3-a276-88a2116dbed0"
}
Use network compression for replication traffic.
A VM disk with a destination path, a disk format, a storage policy, and the replication status.
Specify whether LWD encryption is enabled for this replication.
An ID of the target VC server.
Point-in-time recovery enabled
Target RPO in minutes.
Enable automatic replication of new disks that are added to a VM that is replicated.
The ID to the virtual machine that is going to be replicated.
A flag that defines whether the quiescing method is enabled.
Point-in-time recovery instances per day.
The ID of the vSphere Replication server this group resides on. In case of null, the server will be automatically determined.
Point-in-time recovery days to retain instances for.
Flag defining if VM’s DataSets replication is enabled.
Authentication
Response
Response BodyResponse Body
202 Accepted
Configure replication tasks
{
"_meta": {
"errors": [
{
"code": "string",
"field": "string",
"message": "string"
}
],
"limit": 0,
"links": {
"next": {
"href": "string"
},
"previous": {
"href": "string"
},
"self": {
"href": "string"
}
},
"offset": 0,
"total": 0
},
"list": [
{
"complete_time": "string",
"description": "string",
"description_id": "string",
"entity": "string",
"entity_name": "string",
"error": {
"details": "string",
"message": "string"
},
"id": "string",
"progress": 0,
"queued_time": "string",
"result": {},
"start_time": "string",
"status": "QUEUED"
}
]
}
Errors
Bad request - the server could not understand the request due to invalid syntax or invalid request body content
Unauthorized - the client must authenticate itself to get the requested response
Forbidden - not sufficient access rights to fulfill the request
Not Found - server cannot find the requested in URL resource
Internal server error - unexpected condition prevents fulfilling the request
Code Samples
cURL Command
Vendor Extensions
x-dr-permissions:
permissions:
- System.View
- Host.Hbr.HbrManagement
x-dr-remote-site-connectivity-contract:
not-authenticated: ERROR
server-down: ERROR