Run Test

Run Test

Run a test recovery for a given replication. A VM is created and registered at the recovery site. You can use the VM to run tests, security scans and ransomware-cleanup. Operation is available only on recovery site (for incoming replications). The operation requires a valid VMware Live Recovery subscription.

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

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

string
replication_id
Required

The ID of a replication


Request Body

Spec containing test recovery settings.

RunTestRecoverySpec of type(s) application/json
Required

Show optional properties

{
    "instance_id": "string",
    "folder_id": "Folder:folder-19:f26599ec-ff35-4da6-8c4d-72f6761309f3",
    "compute_resource_id": "string",
    "power_on": false
}
{
    "instance_id": "string",
    "folder_id": "Folder:folder-19:f26599ec-ff35-4da6-8c4d-72f6761309f3",
    "compute_resource_id": "string",
    "excluded_disk_backings": [
        {
            "disk_key": 0,
            "destination_path": "my_vm_folder/my_vm_disk_1.vmdk",
            "destination_datastore_id": "Datastore:datastore-16:ff4a23e7-2fed-4be0-be39-479ae372badd"
        }
    ],
    "power_on": false
}
string
instance_id
Required

The instance of the replicated VM to use for test recovery.

string
folder_id
Required

The ID of the folder to add the recovered virtual machine to. Could be a folder or a datacenter.

string
compute_resource_id
Required

The compute resource to which the virtual machine should be attached. Could be a resource pool, a cluster or a host system.

array of object
excluded_disk_backings
Optional

File backings for excluded disks. If 'destination_path' and 'destination_datastore_id' properties are not specified then the disk will be detached from the VM.

boolean
power_on
Required

Whether to power on the VM after the recovery completes.

Authentication
This operation uses the following authentication methods.
Responses
202

Task to monitor the operation progress. Once successfully completed, the task result contains the newly registered VM ID.

Returns TaskDrResponseEntity of type(s) application/json
This response body class contains all of the following: InlineTaskDrResponseEntity0 , InlineTaskDrResponseEntity1
"TaskDrResponseEntity Object"

400

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

Returns ResponseError of type(s) application/json
"ResponseError Object"
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
"ResponseError Object"
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
"ResponseError Object"
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.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"compute_resource_id:"string","folder_id:"string","instance_id:"string","power_on:"boolean"}' https://{api_host}/pairings/{pairing_id}/replications/{replication_id}/actions/test