Overview
The Programming Guide provides information about the VMware Cloud Director Availability REST APIs, including how to use the API services and resources, how to authenticate and construct REST API calls.
The guide focuses on common use cases.
HTTP verbs
To retrieve object representations, clients make HTTP requests to object references. The server supplies these references as href attribute values in responses to GET requests.
This API closely adheres to standard HTTP and REST conventions in the HTTP verbs usage.
Verb | Usage |
---|---|
|
Retrieve a resource. |
|
Create a new resource. |
|
Replace an existing resource. |
|
Update an existing resource, including partial update. |
|
Delete an existing resource. |
HTTP status codes
All responses include an HTTP status code and, unless the status code is 204 (No Content), a Content-Type header. Response content depends on the request. Some responses include a document body, some include only a URL, and some are empty.
This API closely adheres to standard HTTP and REST conventions in the HTTP status codes usage.
Status code | Usage |
---|---|
|
The request is valid and is completed. The response includes a document body. |
|
The request is valid. The requested object is created and can be found at the URL specified in the |
|
The request is valid and an update to an existing object is successfully applied. The response does not include a body. |
|
The request body is malformed, incomplete, or otherwise invalid. The response body includes an error that provides additional information. |
|
The requested object does not exist. |
Errors
When returning an error response (status code >=400), the response body contains a JSON object describing the problem. The JSON error contains the following structure:
Path | Type | Description |
---|---|---|
|
|
A unique error identifier, for example |
|
|
A detailed message. |
|
|
Additional parameters. |
|
|
Stacktrace. |
The following example shows a request attempting to apply a non-existent tag to a note, resulting in a 400 Bad Request response.
HTTP/1.1 403 Forbidden
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 8289
{
"code" : "Forbidden",
"msg" : "Permission denied.",
"args" : [ ],
"stacktrace" : "com.vmware.h4.api.error.exceptions.PermissionDeniedException: Permission denied.\n\tat com.vmware.h4.common.error.ApiErrorProvider.lambda$createStatusCodeMap$4(ApiErrorProvider.java:120)\n\tat com.vmware.h4.common.error.ApiErrorProvider.convertHttpStatusCode(ApiErrorProvider.java:67)\n\tat com.vmware.h4.common.controller.BaseErrorController.error(BaseErrorController.java:71)\n\tat com.vmware.h4.cloud.controller.error.JsonErrorController.error(JsonErrorController.java:31)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)\n\tat org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)\n\tat org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)\n\tat org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n\tat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:645)\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n\tat org.springframework.test.web.servlet.TestDispatcherServlet.service(TestDispatcherServlet.java:72)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:750)\n\tat org.springframework.mock.web.MockFilterChain$ServletFilterProxy.doFilter(MockFilterChain.java:167)\n\tat org.springframework.mock.web.MockFilterChain.doFilter(MockFilterChain.java:134)\n\tat org.springframework.test.web.servlet.MockMvc.perform(MockMvc.java:183)\n\tat com.vmware.spring.restdocs.BaseApiDocumentation.errorExample(BaseApiDocumentation.java:705)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\n\tat org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)\n\tat org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)\n\tat org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)\n\tat org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)\n\tat org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)\n\tat org.springframework.restdocs.JUnitRestDocumentation$1.evaluate(JUnitRestDocumentation.java:61)\n\tat org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)\n\tat org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)\n\tat org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)\n\tat org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)\n\tat org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)\n\tat org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:413)\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)\n\tat org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110)\n\tat org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)\n\tat org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)\n\tat org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)\n\tat org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)\n\tat jdk.internal.reflect.GeneratedMethodAccessor508.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)\n\tat org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)\n\tat org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)\n\tat org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)\n\tat com.sun.proxy.$Proxy2.processTestClass(Unknown Source)\n\tat org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:119)\n\tat jdk.internal.reflect.GeneratedMethodAccessor507.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)\n\tat org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)\n\tat org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)\n\tat org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)\n\tat org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)\n\tat org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)\n\tat org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)\n\tat java.base/java.lang.Thread.run(Thread.java:834)\n"
}
Operation IDs
By setting a value for 'operationID' in the HTTP header, you can trace an operation across all services.
Request headers
Name | Description |
---|---|
|
A string used as an identifier for tracing an operation in the logs across services. |
Request structure
GET /config/is-configured HTTP/1.1
operationID: 2bfb7696-3aa1-49d3-bb40-d9e97df1baba
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/config/is-configured' -i -X GET \
-H 'operationID: 2bfb7696-3aa1-49d3-bb40-d9e97df1baba' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Health Information and Support Bundles
The Cloud Service provides the following diagnostics APIs:
-
health information - provides basic service health information such as database health, connectivity to remote services, and others.
-
support bundle(s) - representing an archive containing system information, logs, configurations of Cloud service instance as well as the same information for Manager Service instance, Replicator Service instances, and Tunnel Service instance.
Get Health Information
GET /diagnostics/health
provides the following information:
-
if the Cloud Service can access its database
-
if the Cloud Service can communicate with the vCenter Server Lookup Service
-
if the Cloud Service can communicate with the Tunnel Service
-
if the Cloud Service can communicate with VMware Cloud Director
-
if the Cloud Service can communicate with the Manager Service
-
the overall health of the Manager Service
Available since: v4.1
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Request structure
GET /diagnostics/health HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/health' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The name of the product. |
|
|
Represents the product version along with the build ID. |
|
|
RPM build time. |
|
|
Unique identifier of the service, which never changes. |
|
|
A value that remains constant for as long as the Cloud Service is running. If the value changes, this indicates the Cloud Service is restarted. |
|
|
The current time (in UTC) of the appliance. |
|
|
The IP address or hostname of the appliance. |
|
|
Indicates if the Cloud Service can communicate with the local Tunnel Service. The connection is successfull when the value is Null, otherwise the value shows the error. |
|
|
Indicates if the Cloud Service can communicate with the local VMware Cloud Director. The connection is successfull when the value is Null, otherwise the value shows the error. |
|
|
Indicates if the Cloud Service can communicate with the local Manager Service. The connection is successfull when the value is Null, otherwise the value shows the error. |
|
|
Diagnostics information about the local Manager service. |
|
|
Indicates if the Cloud Service can communicate with the vCenter Server Lookup Service. The connection is successfull when the value is Null, otherwise the value shows the error. |
|
|
Indicates if the Cloud Service can communicate with its database. The connection is successfull when the value is Null, otherwise the value shows the error. |
|
|
Diagnostics information about the NTP server. |
|
|
Details for the disk usage and free disk space. |
|
|
File system size (in bytes). |
|
|
Free disk space available to user processes (in bytes). |
|
|
Free disk space available to the appliance OS (in bytes). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2792
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "healthInfo",
"resourceType" : "cloudService",
"resourceId" : "resourceId",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "CloudHealthInfo",
"result" : {
"productName" : "VMware Cloud Director Availability Cloud Service",
"buildVersion" : "4.1.0.1660207-48e5972493",
"buildDate" : 1606132528104,
"instanceId" : "0d326966-6338-48ff-86fb-ee0e55b8cd93",
"runtimeId" : "49453711-3448-47c5-9e11-d63287ccfd27",
"currentTime" : 1499177196042,
"address" : "1.2.3.4",
"tunnelError" : {
"code" : "TunnelNotConfigured",
"msg" : "Missing Tunnel settings.",
"args" : [ ],
"stacktrace" : ""
},
"vcdError" : {
"code" : "FailedToRetrieveVcdFromLookupService",
"msg" : "Unable to retrieve vCloud Director endpoint from the LookupService.",
"args" : [ ],
"stacktrace" : ""
},
"managerError" : {
"code" : "ConnectionRefused",
"msg" : "Connection refused.",
"args" : [ ],
"stacktrace" : ""
},
"managerHealth" : {
"productName" : "VMware Cloud Director Availability Manager Service",
"buildVersion" : "4.1.0.1660207-48e5972493",
"buildDate" : 1606132528104,
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"runtimeId" : "107102e0-e03b-404e-8e17-0688c657a74b",
"currentTime" : 1499177196042,
"address" : "1.2.3.4",
"offlineReplicators" : [ ],
"onlineReplicators" : [ ],
"localReplicatorsHealth" : [ ],
"lsError" : null,
"dbError" : {
"code" : "GeneralServerFailure",
"msg" : "Operation aborted due to an unexpected error.",
"args" : [ ],
"stacktrace" : null
},
"ntpError" : null,
"localReplicatorsLsMismatch" : null,
"diskUsage" : {
"total" : 10123528,
"usable" : 8691736,
"free" : 897832
}
},
"lsError" : {
"code" : "LookupServiceNotConfigured",
"msg" : "Missing Lookup Service setting. Please, set one.",
"args" : [ ],
"stacktrace" : ""
},
"dbError" : {
"code" : "ConnectionRefused",
"msg" : "Connection refused.",
"args" : [ ],
"stacktrace" : ""
},
"ntpError" : {
"code" : "FailedToConnectToNtpServer",
"msg" : "Time is not synchronized with the NTP server.",
"args" : [ ],
"stacktrace" : ""
},
"diskUsage" : {
"total" : 10123528,
"usable" : 8691736,
"free" : 897832
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Support Bundles
The support bundles contain logs and configuration files that are useful for troubleshooting issues.
Generate a Support Bundle
POST /diagnostics/bundles
generates a new support bundle.
Note that this operation requires administrative permissions and might take some time to complete.
Available since: v2
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Request structure
POST /diagnostics/bundles HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/bundles' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The ID of the generated bundle. |
|
|
The timestamp of the moment the bundle was generated. |
|
|
A SHA-512 checksum of the bundle payload. |
|
|
The owner of the bundle. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 608
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "unknown",
"resourceType" : "unknown",
"resourceId" : null,
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SupportBundleInfo",
"result" : {
"id" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"generatedOn" : 1499929548951,
"sha" : "SHA-512:2C:...:ED:A0",
"owner" : "owner1"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Generate a Support Bundle with an ID
POST /diagnostics/bundles/{bundleId}
generates a new support bundle with an ID provided by the user.
This operation requires administrative permissions and might take some time.
Available since: v2
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
User-provided ID to use when generating the bundle. |
Request structure
POST /diagnostics/bundles/2bfb7696-3aa1-49d3-bb40-d9e97df1baba HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/bundles/2bfb7696-3aa1-49d3-bb40-d9e97df1baba' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The ID of the generated bundle. |
|
|
The timestamp of the moment the bundle was generated. |
|
|
A SHA-512 checksum of the bundle payload. |
|
|
The owner of the bundle. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 649
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "generate",
"resourceType" : "supportBundle",
"resourceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SupportBundleInfo",
"result" : {
"id" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"generatedOn" : 1499929548951,
"sha" : "SHA-512:2C:...:ED:A0",
"owner" : "owner1"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Generate a Single-Use Cookie to Download a Support Bundle
POST /diagnostics/bundles/cookie/{bundleId}
generates a one-time cookie that can be used to download a support bundle.
This operation requires administrative permissions.
Available since: v2
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
User-provided ID to use when generating the bundle. |
Request structure
POST /diagnostics/bundles/cookie/5ee9224f-305d-46f6-865f-b605e70acef8 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/bundles/cookie/5ee9224f-305d-46f6-865f-b605e70acef8' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The generated cookie. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 47
{
"cookie" : "lBvDMttZLLnWVZwC+85ufqiNt4M="
}
List the Available to Download Support Bundles
GET /diagnostics/bundles
lists all support bundles that are available to download.
Available since: v2
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Request structure
GET /diagnostics/bundles HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/bundles' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The id of the bundle. |
|
|
The timestamp of the moment the bundle was generated. |
|
|
A SHA-512 checksum of the bundle payload. |
|
|
The owner of the bundle. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 144
[ {
"id" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"generatedOn" : 1499929548951,
"sha" : "SHA-512:2C:...:ED:A0",
"owner" : "owner1"
} ]
Download a Support Bundle
GET /diagnostics/bundles/{bundleId}
downloads the specified support bundle by ID.
Available since: v3.5
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
The id of the bundle to download. |
Request structure
GET /diagnostics/bundles/5ee9224f-305d-46f6-865f-b605e70acef8 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/bundles/5ee9224f-305d-46f6-865f-b605e70acef8' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
To save the bundle file in the current folder, pass the -J and -O arguments to curl. |
Example response
HTTP/1.1 200 OK
Content-Type: application/x-gtar
Content-Disposition: inline; filename="cloud-bundle-2bfb7696-3aa1-49d3-bb40-d9e97df1baba-2017-07-13_07-05-48_UTC.tar.bz2"
Accept-Ranges: bytes
Content-Length: 39
<<bundle contents, a .tar.bz2 archive>>
Download a Support Bundle by Using a Cookie
GET /diagnostics/bundles/cookie/{bundleId}
downloads the specified support bundle by ID,
without requiring a valid API key. Use this API in client-side web browsers.
Available since: v3.5
Required roles: (authentication not required)
Path parameters
Parameter | Description |
---|---|
|
The id of the bundle to download. |
Request structure
GET /diagnostics/bundles/cookie/5ee9224f-305d-46f6-865f-b605e70acef8?cookie=lBvDMttZLLnWVZwC+85ufqiNt4M%3D&cookie=lBvDMttZLLnWVZwC%2B85ufqiNt4M%3D HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/bundles/cookie/5ee9224f-305d-46f6-865f-b605e70acef8?cookie=lBvDMttZLLnWVZwC+85ufqiNt4M%3D&cookie=lBvDMttZLLnWVZwC%2B85ufqiNt4M%3D' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
To save the bundle file in the current folder, pass the -J and -O arguments to curl. |
Example response
HTTP/1.1 200 OK
Content-Type: application/x-gtar
Content-Disposition: inline; filename="cloud-bundle-null-2017-07-13_07-05-48_UTC.tar.bz2"
Accept-Ranges: bytes
Content-Length: 39
<<bundle contents, a .tar.bz2 archive>>
Delete a Support Bundle
DELETE /diagnostics/bundles/{bundleId}
deletes the specified support bundle by ID
and reclaims the disk space that the support bundle occupies.
Available since: v2
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
The ID of the bundle to delete. |
Request structure
DELETE /diagnostics/bundles/5ee9224f-305d-46f6-865f-b605e70acef8 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/bundles/5ee9224f-305d-46f6-865f-b605e70acef8' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
Details of the deleted support bundle. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 608
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "unknown",
"resourceType" : "unknown",
"resourceId" : null,
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SupportBundleInfo",
"result" : {
"id" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"generatedOn" : 1499929548951,
"sha" : "SHA-512:2C:...:ED:A0",
"owner" : "owner1"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Get product information
GET /diagnostics/about
returns information about the product, such as service type, version, build number, and others.
Available since: v3.5
Required roles: EVERYONE
Request structure
GET /diagnostics/about HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/diagnostics/about' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
Machine readable service type ID. |
|
|
The name of the product. |
|
|
Unique identifier of the service, which never changes. |
|
|
Represents the product version along with the build ID. |
|
|
The build time of the product measured in milliseconds. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 234
{
"serviceType" : "CLOUD",
"productName" : "VMware Cloud Director Availability Cloud Service",
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"buildVersion" : "4.1.0.1660207-48e5972493",
"buildDate" : 1606132528104
}
Long running tasks
By using the tasks resources you can track the progress of long-running operations, like job executions. To retrieve an update on the progress, currently polling is the only supported method.
Get the Details of a Task
GET /tasks/{taskId}
retrieves the current state of the task. The result (failure or success) is not available yet.
User A cannot retrieve the tasks of user B. |
Different tasks have different result types. |
During the execution of the task, warnings may occur, indicating a failure that is not critical and the task continues to execute. |
Available since: v2
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
UUID of the task. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to retrieve the task from. Could be a remote site or the local one. |
Request structure
GET /tasks/2bfb7696-3aa1-49d3-bb40-d9e97df1baba?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/tasks/2bfb7696-3aa1-49d3-bb40-d9e97df1baba?site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The result of the task. Populated only if the execution was successful. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 622
{
"id" : "f61d60d2-698a-46dc-a266-88df27644956",
"user" : "root",
"workflowInfo" : {
"type" : "update",
"resourceType" : "appliance",
"resourceId" : null,
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "UpdateRepoConfig",
"result" : {
"defaultUpdateRepo" : "my-update-url.com",
"customUpdateRepo" : {
"repositoryUrl" : "cdrom://",
"username" : null,
"password" : null
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Get the Details of Multiple Tasks
POST /tasks/poll
requests the tasks that are specified in the body. Use this request for efficient task polling.
The returned task is filtered and only the task that belongs to the current user is returned.
Available since: v2
Required roles: One of EVERYONE, PEER_MONITORING
Request parameters
Parameter | Description |
---|---|
|
Optional site to retrieve the task from. Could be a remote site or the local one. |
Request fields
Path | Type | Description |
---|---|---|
|
|
List of task ids. |
Request structure
POST /tasks/poll?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 122
[ "f61d60d2-698a-46dc-a266-88df27644956", "5ee9224f-305d-46f6-865f-b605e70acef8", "2bfb7696-3aa1-49d3-bb40-d9e97df1baba" ]
Example request
$ curl 'https://localhost:8046/tasks/poll?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '[ "f61d60d2-698a-46dc-a266-88df27644956", "5ee9224f-305d-46f6-865f-b605e70acef8", "2bfb7696-3aa1-49d3-bb40-d9e97df1baba" ]'
Response structure
Path | Type | Description |
---|---|---|
|
|
Names of task properties. |
|
|
List of values of task properties. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 277
{
"propertyNames" : [ "id", "user", "workflowInfo.type", "workflowInfo.resourceType", "workflowInfo.resourceId", "workflowInfo.resourceName", "progress", "state", "lastUpdated", "startTime", "endTime", "resultType", "result", "error", "warnings", "site" ],
"values" : [ ]
}
Get the Details of All the Tasks
GET /tasks
retrieves all the tasks of the current user. This request allows paging. The result contains multiple task details.
See Get the Details of a Task for information about the details of each task.
By default, the maximum retrievable elements are 100. |
By default, the tasks are sorted in descending order by startTime. |
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Request parameters
Parameter | Description |
---|---|
|
Optional site to retrieve the task from. Could be a remote site or the local one. |
|
When present, the IDs of the returned tasks are listed. Expects comma-separated task IDs. |
|
Optional case sensitive filtering field. |
|
Optional case sensitive filtering field, available only to admins.When present, filtering by user is not supported. |
|
When present, applies equals filtering by username. Available only to admins. |
|
When present, applies equals filtering by state. Available values: [RUNNING, SUCCEEDED, FAILED]. |
|
When present, applies less-than filtering by startTime. |
|
When present, applies greater-than filtering by startTime. |
|
When present, applies less-than filtering by endTime. |
|
When present, applies greater-than filtering by endTime. |
|
When present, applies equals filtering by workflowinfo.type. |
|
When present, applies equals filtering by workflowinfo.resourceId. |
|
When present, applies equals filtering by workflowinfo.resourceName. |
|
When present, applies equals filtering by workflowinfo.resourceType. |
|
An optional list of comma-separated fields, used to sort the result. The default sorting direction is ascending. When a field finishes with a hyphen, the sorting direction for this field is descending. This allows chaining e.g. col,col2-,col3 will result in sorting by col (asc), then by col2 (desc) and finally by col3 (asc). Supported fields: [startTime, state, endTime, user]. If this field is omitted, the result is sorted by start time in descending order. |
|
The maximum number of items the query retrieves. By default the limit is 100, when omitted or higher than the limit of the server. |
|
Number of items to skip before retrieving the items. By default, when ommited, the query offset is 0. |
Request structure
GET /tasks?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/tasks?site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The total number of items in the database of the Cloud Service. |
|
|
Number of items skipped before retrieving the items. |
|
|
The maximum number of items that this query retrieves. |
|
|
A list of tasks. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 1885
{
"items" : [ {
"id" : "f61d60d2-698a-46dc-a266-88df27644956",
"user" : "root",
"workflowInfo" : {
"type" : "update",
"resourceType" : "appliance",
"resourceId" : null,
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "UpdateRepoConfig",
"result" : {
"defaultUpdateRepo" : "my-update-url.com",
"customUpdateRepo" : {
"repositoryUrl" : "cdrom://",
"username" : null,
"password" : null
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}, {
"id" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"user" : "user1",
"workflowInfo" : {
"type" : "replication",
"resourceType" : "stop",
"resourceId" : "123",
"resourceName" : null
},
"progress" : 100,
"state" : "FAILED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : null,
"result" : null,
"error" : {
"code" : "ReplicationNotFound",
"msg" : "Replication with id '123' was not found.",
"args" : [ "123" ],
"stacktrace" : null
},
"warnings" : [ ],
"site" : "site2"
}, {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"user" : "tenant1",
"workflowInfo" : {
"type" : "generate",
"resourceType" : "supportBundle",
"resourceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"resourceName" : null
},
"progress" : 10,
"state" : "RUNNING",
"lastUpdated" : 1499929548951,
"startTime" : 1499929548951,
"endTime" : -1,
"resultType" : null,
"result" : null,
"error" : null,
"warnings" : [ ],
"site" : "site2"
} ],
"total" : 3,
"offset" : 0,
"limit" : 100
}
Authentication Methods
Administrative Authentication
To establish an administrative connection to the Cloud Service, provide valid SSO credentials for an SSO account that is a member of the ADMINISTRATORS or VRADMINISTRATORS SSO groups. Alternatively, to establish an administrative connection you can use the appliance root user credentials. By using an administrative connection you can monitor and manage any replication and the service itself.
Establish a Session by Using the Appliance Credentials
POST /sessions
creates a new administrative session to the Cloud Service
when the supplied appliance root user credentials are correct.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
The authentication scheme used to establish the new session. To login by using local appliance credentials, you must set this field to 'localUser'. |
|
|
Must be set to 'root'. |
|
|
The password corresponding to the 'root' user account. |
Request structure
POST /sessions HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Host: localhost:8046
Content-Length: 82
{
"type" : "localUser",
"localUser" : "root",
"localPassword" : "password"
}
Example request
$ curl 'https://localhost:8046/sessions' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-d '{
"type" : "localUser",
"localUser" : "root",
"localPassword" : "password"
}'
Response headers
Name | Description |
---|---|
|
API authentication token the client should use on subsequent requests. |
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 132
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
} ]
}
Establish a Session by Using SSO credentials
POST /sessions
creates a new administrative session to the Cloud Service when the supplied SSO credentials are correct.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
The authentication scheme used to establish the new session. To login by using SSO credentials, you must set this field to 'ssoCredentials'. |
|
|
The SSO username. |
|
|
The SSO password. |
Request structure
POST /sessions HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Host: localhost:8046
Content-Length: 83
{
"type" : "ssoCredentials",
"username" : "ssoUser",
"password" : "ssoPass"
}
Example request
$ curl 'https://localhost:8046/sessions' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-d '{
"type" : "ssoCredentials",
"username" : "ssoUser",
"password" : "ssoPass"
}'
Response headers
Name | Description |
---|---|
|
API authentication token the client should use on subsequent requests. |
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 132
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
} ]
}
Establish a Session by Using SSO SAML token
Use the SSO SAML token as a recommended authentication method for the external systems to communicate with the Cloud Service API.
POST /sessions
creates a new administrative session to the Cloud service.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
The authentication scheme used to establish the new session. To login by using SAML token, you must set this field to 'ssoToken'. |
|
|
The SAML token. |
|
|
The difference, according to the client, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
A sequence of random characters that the client generates for each login request. |
|
|
A Base64-encoded SHA256withRSA signature of samlToken + timestamp + nonce. Only needed for Holder-of-Key SAML tokens. |
Request structure
POST /sessions HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Host: localhost:8046
Content-Length: 205
{
"type" : "ssoToken",
"samlToken" : "<saml2:Assertion xmlns:saml2=...>...</saml2:Assertion>",
"timestamp" : 1465194049081,
"nonce" : "jF845646gJzx734",
"signature" : "c2FtcGxlU2lnbmF0dXJlCg=="
}
Example request
$ curl 'https://localhost:8046/sessions' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-d '{
"type" : "ssoToken",
"samlToken" : "<saml2:Assertion xmlns:saml2=...>...</saml2:Assertion>",
"timestamp" : 1465194049081,
"nonce" : "jF845646gJzx734",
"signature" : "c2FtcGxlU2lnbmF0dXJlCg=="
}'
Response headers
Name | Description |
---|---|
|
API authentication token the client should use on subsequent requests. |
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 132
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
} ]
}
Establish a Session by Using VMware Cloud Director Provider Credentials
POST /sessions
creates a new administrative session to the Cloud Service.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
The authentication scheme used to establish the new session. To login by using VMware Cloud Director credentials, you must set this field to 'vcdCredentials'. |
|
|
Must be set to 'root@System'. |
|
|
The password corresponding to the 'root' user account. |
Request structure
POST /sessions HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Host: localhost:8046
Content-Length: 90
{
"type" : "vcdCredentials",
"vcdUser" : "root@System",
"vcdPassword" : "password"
}
Example request
$ curl 'https://localhost:8046/sessions' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-d '{
"type" : "vcdCredentials",
"vcdUser" : "root@System",
"vcdPassword" : "password"
}'
Response headers
Name | Description |
---|---|
|
API authentication token the client should use on subsequent requests. |
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 132
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
} ]
}
Tenant Authentication
Use VMware Cloud Director tenant credentials to establish a user session to the Cloud Service. User sessions do not have administrative privileges and can only manage and monitor the replications that the user owns.
Establish a Session by Using VMware Cloud Director Tenant Credentials
POST /sessions
creates a new user session to the Cloud Service.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
Identifies the authentication scheme to use for beginning the new session. To login using VMware Cloud Director credentials, you must set this field to 'vcdCredentials'. |
|
|
The fully qualified username of the tenant. |
|
|
The password corresponding to tenant account. |
Request structure
POST /sessions HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Host: localhost:8046
Content-Length: 90
{
"type" : "vcdCredentials",
"vcdUser" : "admin1@org2",
"vcdPassword" : "password"
}
Example request
$ curl 'https://localhost:8046/sessions' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-d '{
"type" : "vcdCredentials",
"vcdUser" : "admin1@org2",
"vcdPassword" : "password"
}'
Response headers
Name | Description |
---|---|
|
API authentication token the client should use on subsequent requests. |
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 132
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
} ]
}
Establish a Session by Using VMware Cloud Director JWT
When you have access to a VMware Cloud Director JSON Web Token (JWT) that is associated with an active VMware Cloud Director session, you can use the JWT to create a user session to the Cloud Service. For more information about JWT, see https://docs.vmware.com/en/VMware-Cloud-Director-Availability/4.0/VMware-Cloud-Director-Availability-40-User-Guide/GUID-C56B7E35-70F1-455D-A9D0-704E4A3A073D.html
POST /sessions
creates a new user session to the Cloud Service.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
The authentication scheme used to establish the new session. To login by using VMware Cloud Director JWT, you must set this field to 'vcdAccessToken'. |
|
|
The VMware Cloud Director JWT. |
|
|
If this token is issued by a VMware Cloud Director instance different than the local one, this field is used to setup the authorization context header used for Multisite. |
Request structure
POST /sessions HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Host: localhost:8046
Content-Length: 105
{
"type" : "vcdAccessToken",
"vcdAccessToken" : "eyJhbGciOiJSUzI1NiJ9....",
"context" : "acme-dr"
}
Example request
$ curl 'https://localhost:8046/sessions' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-d '{
"type" : "vcdAccessToken",
"vcdAccessToken" : "eyJhbGciOiJSUzI1NiJ9....",
"context" : "acme-dr"
}'
Response headers
Name | Description |
---|---|
|
API authentication token the client should use on subsequent requests. |
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 132
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
} ]
}
Session Lifecycle Management
Get the Current Session
GET /sessions
returns the currently authenticated session.
Available since: v2
Required roles: One of EVERYONE, PEER_MONITORING
Request structure
GET /sessions HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/sessions' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 180
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
}, {
"site" : "site2",
"org" : "org2"
} ]
}
Extend the Session by Using VMware Cloud Director Credentials
To manage replications on remote cloud sites, you must first extend your session to the remote site by using VMware Cloud Director mulltisite authentication. Prerequisites are that the VMware Cloud Director instances and the respective organization in each site must be associated.
POST /sessions/extend
extends the Cloud Service session by using
VMware Cloud Director organization credentials for the remote site.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
The type of authentication. For authentication with VMware Cloud Director credentials, you must set this field to 'credentials'. |
|
|
The VMware Cloud Director site that you are logging in to. |
|
|
A fully qualified VMware Cloud Director username. |
|
|
The corresponding password. |
Request structure
POST /sessions/extend HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 111
{
"type" : "credentials",
"site" : "site1",
"vcdUsername" : "admin1@org2",
"vcdPassword" : "password"
}
Example request
$ curl 'https://localhost:8046/sessions/extend' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "credentials",
"site" : "site1",
"vcdUsername" : "admin1@org2",
"vcdPassword" : "password"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 180
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
}, {
"site" : "site2",
"org" : "org2"
} ]
}
Extend the Session by Using VMware Cloud Director JWT
To manage replications on remote cloud sites, you must first extend your session to the remote site by providing JWT for the remote VMware Cloud Director.
POST /sessions/extend
extends the Cloud Service session by using a JWT for the remote site.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
The type of authentication. For authentication with VMware Cloud Director JWT, you must set this field to 'accessToken'. |
|
|
The VMware Cloud Director site that you are logging in to. |
|
|
A valid jwt for the specified VMware Cloud Director. |
|
|
If this token is issued by a VMware Cloud Director instance, different than the local one, this field is used to setup the authorization context header used for Multisite. |
Request structure
POST /sessions/extend HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 119
{
"type" : "accessToken",
"site" : "site1",
"accessToken" : "eyJhbGciOiJSUzI1NiJ9....",
"context" : "acme-dr"
}
Example request
$ curl 'https://localhost:8046/sessions/extend' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "accessToken",
"site" : "site1",
"accessToken" : "eyJhbGciOiJSUzI1NiJ9....",
"context" : "acme-dr"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 180
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
}, {
"site" : "site2",
"org" : "org2"
} ]
}
Extend the Session by Using VMware Cloud Director Multisite Authentication
In order to perform replication management operations that involve remote sites, your session can be "extended" using VMware Cloud Director Mulltisite. This assumes that the VMware Cloud Director instances and the respective Organization in each site are already associated.
POST /sessions/extend
extends the Cloud Service session using
its internally stored Json Web Token that is associated with the current session.
Available since: v2
Required roles: (authentication not required)
Request fields
Path | Type | Description |
---|---|---|
|
|
The type of authentication. For authentication with VMware Cloud Director multisite authentication, set 'multisite'. |
|
|
The VMware Cloud Director sites to which you are logging in. |
|
|
The short name of the remote organization. This field sets up the X-VMWAREVCLOUD-AUTH-CONTEXT header. |
Request structure
POST /sessions/extend HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 64
{
"type" : "multisite",
"site" : "site1",
"org" : "org1"
}
Example request
$ curl 'https://localhost:8046/sessions/extend' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "multisite",
"site" : "site1",
"org" : "org1"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 180
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
}, {
"site" : "site2",
"org" : "org2"
} ]
}
Shrink the Session
DELETE /sessions/{site}
forces the Cloud Service to forget the associated authentication
for the external site (if any) for the current session.
Available since: v2
Required roles: EVERYONE
Path parameters
Parameter | Description |
---|---|
|
The VMware Cloud Director site to exclude from the current session. |
Request structure
DELETE /sessions/eu-sof-1 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/sessions/eu-sof-1' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The currently authenticated user. |
|
|
Roles granted to the session. |
|
|
VMware Cloud Director sites that the current session is authenticated with. The site specified in the request should be present. |
|
|
A site the current session has access to. |
|
|
The VMware Cloud Director organization shortname that you authenticated as. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 180
{
"user" : "user1@org1",
"roles" : [ "EVERYONE" ],
"authenticatedSites" : [ {
"site" : "site1",
"org" : "org1"
}, {
"site" : "site2",
"org" : "org2"
} ]
}
Terminate the Session
DELETE /sessions
invalidates an existing Cloud Service session.
Available since: v2
Required roles: One of EVERYONE, PEER_MONITORING
Request structure
DELETE /sessions HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/sessions' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Example response
HTTP/1.1 204 No Content
Replication Policies
Replication policies are a set of rules, which can be applied to multiple organizations.
A policy consists of:
-
Minimum RPO - the minimum Recovery Point Objective (RPO) that the backing virtual data centers can handle. The lower the RPO is, the higher the infrastructure load gets.
-
Maximum number of instances - upper bound for instances per VM replication.
-
Maximum number of replications - controls whether the organizations can be used as replication source and how much incoming replications they can have.
The service has a system policy called "Default Policy". By default it does not allow organizations, associated with it, to be used as replication source / destination.
By default, all organizations without an explicitly assigned policy have the default policy assigned. |
By increasing the maximum number of replications for the default policy from zero to a positive value, all organizations without an explicitly assigned policy can use replications. |
Get the Details of All the Policies
GET /policies
retrieves the details of all policies.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
The local or remote site where the policy is defined. When omitted, the local site is assumed. |
Request structure
GET /policies HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/policies' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
User-visible policy label, useful for debugging and other UI purposes. The value is unique and case-sensitive. |
|
|
The minimum RPO value. Incoming replications cannot be configured when the policy of the destination organization has a minimum RPO that is higher than the minimum RPO in the replication settings. |
|
|
When the replication has a configured max rotated instances, this field controls the maximum number of instances a VM replication can have. |
|
|
The maximum number of stored instances a VM replication can have. |
|
|
This value controls how many incoming replications organizations can have. A negative value means unlimited number replications. 0 means the org can not be used as destination. A positive value represents upper bound. This field is ignored if allowIncomingProtections and allowIncomingMigrations are set to false. |
|
|
A boolean flag indicating whether incoming protections are allowed or not. |
|
|
A boolean flag indicating whether outgoing protections are allowed or not. |
|
|
A boolean flag indicating whether incoming migrations are allowed or not. |
|
|
A boolean flag indicating whether outgoing migrations are allowed or not. |
|
|
The maximum bit rate (in Mbit/sec) for replication data traffic from an on-premises appliance to this organization. All on-premises appliances receive the limit when pairing or re-pairing with this site and each on-premises appliance enforces this limit. |
|
|
Whether custom SLA settings like RPO, quescing, retention policy, and others can be set when creating or editing a replication, or the organizations are restricted to only use SLA profiles. |
|
|
Indicates whether organizations can configure notification settings. |
|
|
The number of organizations, which have this policy assigned. |
|
|
Unique policy ID - for manually created policies this is a UUID.The default policy has a hard-coded ID 'default'. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 415
[ {
"id" : "default",
"displayName" : "Default Policy",
"orgs" : -1,
"minRpo" : 15,
"maxInstances" : 24,
"maxPinnedInstances" : 0,
"maxIncoming" : 0,
"allowIncomingProtections" : false,
"allowOutgoingProtections" : false,
"allowIncomingMigrations" : true,
"allowOutgoingMigrations" : true,
"onpremDataCap" : 0,
"allowCustomSlaSettings" : true,
"allowNotificationConfiguration" : true
} ]
Get the Details of a Policy
GET /policies/{id}
retrieves the details of a specific policy.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Unique policy ID - the default policy has 'default' for ID. All other policies have UUID for ID. |
Request parameters
Parameter | Description |
---|---|
|
The local or remote site where the policy is defined. When omitted, the local site is assumed. |
Request structure
GET /policies/107102e0-e03b-404e-8e17-0688c657a74b HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/policies/107102e0-e03b-404e-8e17-0688c657a74b' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
User-visible policy label, useful for debugging and other UI purposes. The value is unique and case-sensitive. |
|
|
The minimum RPO value. Incoming replications cannot be configured when the policy of the destination organization has a minimum RPO that is higher than the minimum RPO in the replication settings. |
|
|
When the replication has a configured max rotated instances, this field controls the maximum number of instances a VM replication can have. |
|
|
The maximum number of stored instances a VM replication can have. |
|
|
This value controls how many incoming replications organizations can have. A negative value means unlimited number replications. 0 means the org can not be used as destination. A positive value represents upper bound. This field is ignored if allowIncomingProtections and allowIncomingMigrations are set to false. |
|
|
A boolean flag indicating whether incoming protections are allowed or not. |
|
|
A boolean flag indicating whether outgoing protections are allowed or not. |
|
|
A boolean flag indicating whether incoming migrations are allowed or not. |
|
|
A boolean flag indicating whether outgoing migrations are allowed or not. |
|
|
The maximum bit rate (in Mbit/sec) for replication data traffic from an on-premises appliance to this organization. All on-premises appliances receive the limit when pairing or re-pairing with this site and each on-premises appliance enforces this limit. |
|
|
Whether custom SLA settings like RPO, quescing, retention policy, and others can be set when creating or editing a replication, or the organizations are restricted to only use SLA profiles. |
|
|
Indicates whether organizations can configure notification settings. |
|
|
The number of organizations, which have this policy assigned. |
|
|
Unique policy ID - for manually created policies this is a UUID.The default policy has a hard-coded ID 'default'. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 411
{
"id" : "default",
"displayName" : "Default Policy",
"orgs" : -1,
"minRpo" : 15,
"maxInstances" : 24,
"maxPinnedInstances" : 0,
"maxIncoming" : 0,
"allowIncomingProtections" : false,
"allowOutgoingProtections" : false,
"allowIncomingMigrations" : true,
"allowOutgoingMigrations" : true,
"onpremDataCap" : 0,
"allowCustomSlaSettings" : true,
"allowNotificationConfiguration" : true
}
Get the Compliance Status of a Policy
GET /policies/{id}/status
retrieves the compliance status of a specific policy.
Available since: v3.5
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
Unique policy ID - the default policy has 'default' for ID. All other policies have UUID for ID. |
Request structure
GET /policies/52ce9bc4-2563-448d-b8af-9047a03ce5c2/status HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/policies/52ce9bc4-2563-448d-b8af-9047a03ce5c2/status' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
List of statuses for each destination organization. |
|
|
The VMware Cloud Director destination organization. |
|
|
The number of configured replications. |
|
|
When the incoming VM replications quota is exceeded, this property shows by how many. |
|
|
When the incoming protections are disabled, this property shows how many violate the rule. |
|
|
When the incoming migrations are disabled, this property shows how many violate the rule. |
|
|
List of VM replication IDs, which have RPO, lower than the policy limit. |
|
|
List of VM replication IDs, which have more instances than the policy limit. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 281
[ {
"org" : "org1",
"configuredReplications" : 2,
"quotaViolation" : 0,
"protectionViolation" : 0,
"migrationViolation" : 0,
"nonRpoCompliant" : [ "C4-ec991bd5-af9d-446a-8599-5b693842c4a3" ],
"nonInstancesCompliant" : [ "C4-ec991bd5-af9d-446a-8599-5b693842c4a3" ]
} ]
Create a Policy
POST /policies
creates a new policy, that can be assigned to organizations.
Available since: v4
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Request fields
Path | Type | Description |
---|---|---|
|
|
User-visible policy label, useful for debugging and other UI purposes. The value is unique and case-sensitive. |
|
|
The minimum RPO value. Incoming replications cannot be configured when the policy of the destination organization has a minimum RPO that is higher than the minimum RPO in the replication settings. |
|
|
When the replication has a configured max rotated instances, this field controls the maximum number of instances a VM replication can have. |
|
|
The maximum number of stored instances a VM replication can have. |
|
|
This value controls how many incoming replications organizations can have. A negative value means unlimited number replications. 0 means the org can not be used as destination. A positive value represents upper bound. This field is ignored if allowIncomingProtections and allowIncomingMigrations are set to false. |
|
|
A boolean flag indicating whether incoming protections are allowed or not. |
|
|
A boolean flag indicating whether outgoing protections are allowed or not. |
|
|
A boolean flag indicating whether incoming migrations are allowed or not. |
|
|
A boolean flag indicating whether outgoing migrations are allowed or not. |
|
|
The maximum bit rate (in Mbit/sec) for replication data traffic from an on-premises appliance to this organization. All on-premises appliances receive the limit when pairing or re-pairing with this site and each on-premises appliance enforces this limit. |
|
|
Whether custom SLA settings like RPO, quescing, retention policy, and others can be set when creating or editing a replication, or the organizations are restricted to only use SLA profiles. |
|
|
Indicates whether organizations can configure notification settings. |
Request structure
POST /policies HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 377
{
"displayName" : "Golden Policy",
"minRpo" : 5,
"maxInstances" : 24,
"maxPinnedInstances" : 24,
"maxIncoming" : -1,
"allowIncomingProtections" : true,
"allowOutgoingProtections" : false,
"allowIncomingMigrations" : true,
"allowOutgoingMigrations" : false,
"onpremDataCap" : 50,
"allowCustomSlaSettings" : true,
"allowNotificationConfiguration" : true
}
Example request
$ curl 'https://localhost:8046/policies' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"displayName" : "Golden Policy",
"minRpo" : 5,
"maxInstances" : 24,
"maxPinnedInstances" : 24,
"maxIncoming" : -1,
"allowIncomingProtections" : true,
"allowOutgoingProtections" : false,
"allowIncomingMigrations" : true,
"allowOutgoingMigrations" : false,
"onpremDataCap" : 50,
"allowCustomSlaSettings" : true,
"allowNotificationConfiguration" : true
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
User-visible policy label, useful for debugging and other UI purposes. The value is unique and case-sensitive. |
|
|
The minimum RPO value. Incoming replications cannot be configured when the policy of the destination organization has a minimum RPO that is higher than the minimum RPO in the replication settings. |
|
|
When the replication has a configured max rotated instances, this field controls the maximum number of instances a VM replication can have. |
|
|
The maximum number of stored instances a VM replication can have. |
|
|
This value controls how many incoming replications organizations can have. A negative value means unlimited number replications. 0 means the org can not be used as destination. A positive value represents upper bound. This field is ignored if allowIncomingProtections and allowIncomingMigrations are set to false. |
|
|
A boolean flag indicating whether incoming protections are allowed or not. |
|
|
A boolean flag indicating whether outgoing protections are allowed or not. |
|
|
A boolean flag indicating whether incoming migrations are allowed or not. |
|
|
A boolean flag indicating whether outgoing migrations are allowed or not. |
|
|
The maximum bit rate (in Mbit/sec) for replication data traffic from an on-premises appliance to this organization. All on-premises appliances receive the limit when pairing or re-pairing with this site and each on-premises appliance enforces this limit. |
|
|
Whether custom SLA settings like RPO, quescing, retention policy, and others can be set when creating or editing a replication, or the organizations are restricted to only use SLA profiles. |
|
|
Indicates whether organizations can configure notification settings. |
|
|
The number of organizations, which have this policy assigned. |
|
|
Unique policy ID - for manually created policies this is a UUID.The default policy has a hard-coded ID 'default'. |
Example response
HTTP/1.1 201 Created
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 438
{
"id" : "107102e0-e03b-404e-8e17-0688c657a74b",
"displayName" : "Golden Policy",
"orgs" : 5,
"minRpo" : 5,
"maxInstances" : 24,
"maxPinnedInstances" : 24,
"maxIncoming" : -1,
"allowIncomingProtections" : true,
"allowOutgoingProtections" : true,
"allowIncomingMigrations" : true,
"allowOutgoingMigrations" : true,
"onpremDataCap" : 50,
"allowCustomSlaSettings" : true,
"allowNotificationConfiguration" : true
}
Delete a Policy
DELETE /policies/{id}
deletes the specified policy when no organizations are associated with the policy.
The default policy cannot be deleted. |
Available since: v3.5
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
The unique policy ID. |
Request structure
DELETE /policies/107102e0-e03b-404e-8e17-0688c657a74b HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/policies/107102e0-e03b-404e-8e17-0688c657a74b' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Example response
HTTP/1.1 204 No Content
Update a Policy
PUT /policies/{id}
overwrites the policy properties with the provided ones.
Updating the policy configuration does not affect the ongoing replications. If there are any replications that violate the policy constraints, they have to be handled manually. |
Available since: v4
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
The unique policy ID. |
Request fields
Path | Type | Description |
---|---|---|
|
|
User-visible policy label, useful for debugging and other UI purposes. The value is unique and case-sensitive. |
|
|
The minimum RPO value. Incoming replications cannot be configured when the policy of the destination organization has a minimum RPO that is higher than the minimum RPO in the replication settings. |
|
|
When the replication has a configured max rotated instances, this field controls the maximum number of instances a VM replication can have. |
|
|
The maximum number of stored instances a VM replication can have. |
|
|
This value controls how many incoming replications organizations can have. A negative value means unlimited number replications. 0 means the org can not be used as destination. A positive value represents upper bound. This field is ignored if allowIncomingProtections and allowIncomingMigrations are set to false. |
|
|
A boolean flag indicating whether incoming protections are allowed or not. |
|
|
A boolean flag indicating whether outgoing protections are allowed or not. |
|
|
A boolean flag indicating whether incoming migrations are allowed or not. |
|
|
A boolean flag indicating whether outgoing migrations are allowed or not. |
|
|
The maximum bit rate (in Mbit/sec) for replication data traffic from an on-premises appliance to this organization. All on-premises appliances receive the limit when pairing or re-pairing with this site and each on-premises appliance enforces this limit. |
|
|
Whether custom SLA settings like RPO, quescing, retention policy, and others can be set when creating or editing a replication, or the organizations are restricted to only use SLA profiles. |
|
|
Indicates whether organizations can configure notification settings. |
Request structure
PUT /policies/107102e0-e03b-404e-8e17-0688c657a74b HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 377
{
"displayName" : "Golden Policy",
"minRpo" : 5,
"maxInstances" : 24,
"maxPinnedInstances" : 24,
"maxIncoming" : -1,
"allowIncomingProtections" : true,
"allowOutgoingProtections" : false,
"allowIncomingMigrations" : true,
"allowOutgoingMigrations" : false,
"onpremDataCap" : 50,
"allowCustomSlaSettings" : true,
"allowNotificationConfiguration" : true
}
Example request
$ curl 'https://localhost:8046/policies/107102e0-e03b-404e-8e17-0688c657a74b' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"displayName" : "Golden Policy",
"minRpo" : 5,
"maxInstances" : 24,
"maxPinnedInstances" : 24,
"maxIncoming" : -1,
"allowIncomingProtections" : true,
"allowOutgoingProtections" : false,
"allowIncomingMigrations" : true,
"allowOutgoingMigrations" : false,
"onpremDataCap" : 50,
"allowCustomSlaSettings" : true,
"allowNotificationConfiguration" : true
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
User-visible policy label, useful for debugging and other UI purposes. The value is unique and case-sensitive. |
|
|
The minimum RPO value. Incoming replications cannot be configured when the policy of the destination organization has a minimum RPO that is higher than the minimum RPO in the replication settings. |
|
|
When the replication has a configured max rotated instances, this field controls the maximum number of instances a VM replication can have. |
|
|
The maximum number of stored instances a VM replication can have. |
|
|
This value controls how many incoming replications organizations can have. A negative value means unlimited number replications. 0 means the org can not be used as destination. A positive value represents upper bound. This field is ignored if allowIncomingProtections and allowIncomingMigrations are set to false. |
|
|
A boolean flag indicating whether incoming protections are allowed or not. |
|
|
A boolean flag indicating whether outgoing protections are allowed or not. |
|
|
A boolean flag indicating whether incoming migrations are allowed or not. |
|
|
A boolean flag indicating whether outgoing migrations are allowed or not. |
|
|
The maximum bit rate (in Mbit/sec) for replication data traffic from an on-premises appliance to this organization. All on-premises appliances receive the limit when pairing or re-pairing with this site and each on-premises appliance enforces this limit. |
|
|
Whether custom SLA settings like RPO, quescing, retention policy, and others can be set when creating or editing a replication, or the organizations are restricted to only use SLA profiles. |
|
|
Indicates whether organizations can configure notification settings. |
|
|
The number of organizations, which have this policy assigned. |
|
|
Unique policy ID - for manually created policies this is a UUID.The default policy has a hard-coded ID 'default'. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 438
{
"id" : "107102e0-e03b-404e-8e17-0688c657a74b",
"displayName" : "Golden Policy",
"orgs" : 5,
"minRpo" : 5,
"maxInstances" : 24,
"maxPinnedInstances" : 24,
"maxIncoming" : -1,
"allowIncomingProtections" : true,
"allowOutgoingProtections" : true,
"allowIncomingMigrations" : true,
"allowOutgoingMigrations" : true,
"onpremDataCap" : 50,
"allowCustomSlaSettings" : true,
"allowNotificationConfiguration" : true
}
Assign a Policy to an Organization
PATCH /policies/{id}/orgs/{org}
assigns the given policy to the local VMware Cloud Director organization.
All future configure and reconfigure replication requests that violate the policy constraints are rejected.
If the organization has an assigned policy, it is overwritten. |
Assigning a policy does not affect the ongoing replications. If there are any replications that violate the policy constraints, they have to be handled manually. |
Available since: v3.5
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
The unique policy ID. |
|
The short name of the local VMware Cloud Director organization. |
Request structure
PATCH /policies/107102e0-e03b-404e-8e17-0688c657a74b/orgs/org2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/policies/107102e0-e03b-404e-8e17-0688c657a74b/orgs/org2' -i -X PATCH \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Example response
HTTP/1.1 202 Accepted
Synchronize the Policies
POST /policies/sync
assigns the default policy to all organizations that do not have an assigned policy,
for example, after creating an organization.
This request also cleans mappings that are leftover, for example, after deleting an organization.
The Cloud Service automatically executes this request periodically. Use this request to update the mappings momentarily. |
Available since: v3.5
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Request structure
POST /policies/sync HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/policies/sync' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The task has no result. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 445
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "sync",
"resourceType" : "policies",
"resourceId" : null,
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : null,
"result" : null,
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Replications
Use the replications requests to create, manage, and monitor replications.
Start New VM Replication
POST /vm-replications
starts a new replication. If the task is successfull and the VM is powered on, the VM starts syncronizing.
After the initial synchronization completes, a new instance is created, that allows performing a failover.
If the VM is turned off or suspended, you must perform the initial synchronization manually, otherwise no new instances are created. |
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source VM location and ID. |
|
|
Type of the source. Set to 'vm'. |
|
|
VMware Cloud Director site shortname. |
|
|
Source VM ID in VMware Cloud Director. |
|
|
A list of device keys of the excluded disks. |
|
|
Destination location. |
|
|
Destination type. Set to 'vcloud' for this operation. |
|
|
VMware Cloud Director site shortname. |
|
|
The virtual data center in VMware Cloud Director in the destination site. |
|
|
Optional storage profile to use to determine placement of replicated files. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vm-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 656
{
"source" : {
"type" : "vm",
"site" : "site1",
"vmId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vcloud",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vm-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vm",
"site" : "site1",
"vmId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vcloud",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3274
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New VM Replication with Seed
POST /vm-replications
starts a new replication and an offline copy can be used as seed.
The seed VM is identified by its ID in VMware Cloud Director.
To use the seed VM as offline copy, the seed VM must be powered off. |
The seed VM is destroyed and only its disks are used to replicate the source data to. |
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source VM location and ID. |
|
|
Type of the source. Set to 'vm'. |
|
|
VMware Cloud Director site shortname. |
|
|
Source VM ID in VMware Cloud Director. |
|
|
A list of device keys of the excluded disks. |
|
|
Destination location. |
|
|
Destination type. Set to 'vm' for this operation. |
|
|
VMware Cloud Director site shortname. |
|
|
The virtual data center in VMware Cloud Director in the destination site. |
|
|
Optional storage profile to use to determine placement of replicated files. |
|
|
Destination VM ID in VMware Cloud Director, to be used as offline copy. Note: the seed VM will get deleted from VMware Cloud Director and only its disks will be used to replicate the source VM there. All Disks of the source VM should match the ones in the seed VM in order to succeed. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vm-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 709
{
"source" : {
"type" : "vm",
"site" : "site1",
"vmId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vm",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*",
"seedVmId" : "107102e0-e03b-404e-8e17-0688c657a74b"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vm-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vm",
"site" : "site1",
"vmId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vm",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*",
"seedVmId" : "107102e0-e03b-404e-8e17-0688c657a74b"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3274
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New VM Replication from On-Premises
POST /vm-replications
starts a new replication. By using source type 'vcVm' starts a VM replication from
an on-premises site to a cloud site. If the task is successfull and the VM is powered on, the VM starts syncronizing.
After the initial synchronization completes, a new instance is created, that allows performing a failover.
If the VM is turned off or suspended, you must perform the initial synchronization manually, otherwise no new instances are created. |
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source VM location and ID. |
|
|
Discriminator property, should be set to 'vcVm' in this case. |
|
|
VMware Cloud Director site shortname. |
|
|
The UUID of the source vCenter Server, in which the source VM is registered. |
|
|
Source VM managed object ID in vCenter. |
|
|
A list of device keys of the excluded disks. |
|
|
Destination location. |
|
|
Destination type. Set to 'vcloud' for this operation. |
|
|
VMware Cloud Director site shortname. |
|
|
The virtual data center in VMware Cloud Director in the destination site. |
|
|
Optional storage profile to use to determine placement of replicated files. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vm-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 682
{
"source" : {
"type" : "vcVm",
"site" : "site1",
"vcUuid" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmId" : "vm-42",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vcloud",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vm-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vcVm",
"site" : "site1",
"vcUuid" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmId" : "vm-42",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vcloud",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3274
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New VM Replication with Seed from On-Premises
POST /vm-replications
starts a new replication. By using source type 'vcVm' starts a VM replication from an
on-premises site to a cloud site and an offline copy of the VM is used as seed.
The seed VM is identified by its ID in VMware Cloud Director.
To use the seed VM as offline copy, the seed VM must be powered off. |
The seed VM is destroyed and only its disks are used to replicate the source data to. |
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source VM location and ID. |
|
|
Discriminator property, should be set to 'vcVm' in this case. |
|
|
VMware Cloud Director site shortname. |
|
|
The UUID of the source vCenter Server, in which the source VM is registered. |
|
|
Source VM managed object ID in vCenter. |
|
|
A list of device keys of the excluded disks. |
|
|
Destination location. |
|
|
Destination type. Set to 'vm' for this operation. |
|
|
VMware Cloud Director site shortname. |
|
|
The virtual data center in VMware Cloud Director in the destination site. |
|
|
Optional storage profile to use to determine placement of replicated files. |
|
|
Destination VM ID in VMware Cloud Director, to be used as offline copy. Note: the seed VM will get deleted from VMware Cloud Director and only its disks will be used to replicate the source VM there. All Disks of the source VM should match the ones in the seed VM in order to succeed. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vm-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 735
{
"source" : {
"type" : "vcVm",
"site" : "site1",
"vcUuid" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmId" : "vm-42",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vm",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*",
"seedVmId" : "107102e0-e03b-404e-8e17-0688c657a74b"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vm-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vcVm",
"site" : "site1",
"vcUuid" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmId" : "vm-42",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vm",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*",
"seedVmId" : "107102e0-e03b-404e-8e17-0688c657a74b"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3274
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New VM Replication to On-Premises
POST /vm-replications
starts a new replication. By using source type 'vm' and destination type 'vc' starts a
VM replication from a cloud site to an on-premises site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source VM location and ID. |
|
|
Type of the source. Set to 'vm'. |
|
|
VMware Cloud Director site shortname. |
|
|
Source VM ID in VMware Cloud Director. |
|
|
A list of device keys of the excluded disks. |
|
|
Destination location. |
|
|
Destination type. Set to 'vc' for this operation. |
|
|
The shortname of the on-premises site. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vm-replications HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 574
{
"source" : {
"type" : "vm",
"site" : "site1",
"vmId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vc",
"site" : "onprem1"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vm-replications' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vm",
"site" : "site1",
"vmId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vc",
"site" : "onprem1"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3274
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New VM Replication with Seed to On-Premises
POST /vm-replications
starts a new replication. By using source type 'vm' and destination type 'vc' starts a
VM replication from a cloud site to an on-premises site and an offline copy of the VM is used as seed.
The seed VM is identified by its managed object ID in vCenter Server.
To use the seed VM as offline copy, the seed VM must be powered off. |
The seed VM is destroyed and only its disks are used to replicate the source data to. |
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source VM location and ID. |
|
|
Type of the source. Set to 'vm'. |
|
|
VMware Cloud Director site shortname. |
|
|
Source VM ID in VMware Cloud Director. |
|
|
A list of device keys of the excluded disks. |
|
|
Destination location. |
|
|
Destination type. Set to 'vcVapp' for this operation. |
|
|
The shortname of the on-premises site. |
|
|
Ids of the VMs to use as offline copy. Note: the VMs will be deleted, and only their disks will be used as seed. |
|
|
ID of the target VC. |
|
|
MOREF of the target VM. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vm-replications HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 642
{
"source" : {
"type" : "vm",
"site" : "site1",
"vmId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vcVm",
"site" : "site",
"seedVm" : {
"vcId" : "vcId",
"moId" : "moId"
}
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vm-replications' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vm",
"site" : "site1",
"vmId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"excludedDisks" : [ 1000 ]
},
"destination" : {
"type" : "vcVm",
"site" : "site",
"seedVm" : {
"vcId" : "vcId",
"moId" : "moId"
}
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3274
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Get the VM Replications
GET /vm-replications
lists the configured VM-level replications.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Request parameters
Parameter | Description |
---|---|
|
When present, returned replications are filtered by replication owner. Filtering option available only to admins. |
|
When present, returned replications will be source site short name. Local site filtering is not supported. |
|
When present, returned replications are filtered by source site type (e.g. vcloud/vcenter). |
|
When present, returned replications are filtered by source vDC ID. |
|
When present, returned replications are filtered by source vDC name. |
|
When present, returned replications are filtered by VMware Cloud Director source org. |
|
When present, the administrators can filter by source vCenter Server instance ID. |
|
When present, returned replications are filtered by source source VM ID. |
|
When present, returned replications are filtered by Virtual Machine name. The VM name must contain the provided value. |
|
When present, returned replications will storage profile. |
|
When present, returned replications are filtered by destination org. |
|
When present, returned replications are filtered by destination vDC ID. |
|
When present, returned replications are filtered by destination vDC name. |
|
When present, returned replications are filtered by destination site type (e.g. vcloud/vcenter). |
|
When present, returned replications are filtered by destination recovered vAppId. |
|
When present, admins can filter by vCenter instance ID. |
|
When present, admins can filter by datastore moid. vimServerInstanceUuid is required. |
|
When present, returned replications are filtered by replication type: migration or protection. |
|
When present, the SLA Profile to use instead of the custom rpo/dataConnectionType/retentionPolicy settings. |
|
When present, the displayName of the SLA Profile used by a replication. |
|
When present, less-than filtering will be applied. |
|
When present, greater-than filtering will be applied. |
|
When present, returned replications are filtered by their overall health. |
|
When present, returned replications are filtered by their data connection state. |
|
When present, returned replications are filtered by source VMware Cloud Director org shortname. Comma-separated Cloud replication ids are expected. |
|
An optional list of comma-separated fields, used to sort the result.The default sorting direction is ascending. When a field finishes with a hyphen, the direction for this field will be descending. This allows chaining e.g. col,col2-,col3 will result in sorting by col (asc), then by col2 (desc) and finally by col3 (asc). Supported fields: [vmName, sourceSite, sourceOrg, sourceVdcName, site, destinationOrg, destinationVdcName, owner, lastUpdated]. If this field is omitted, the result is sorted by start time in descending order. |
|
Number of items skipped before retrieving the items. By default, 0 if skipped. |
|
Query limit - maximum number of items this query should retrieve. When omitted or higher than the server’s limits, defaults to 100. |
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vm-replications?vmName=my&sourceSite=site1&sourceOrg=org1&site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications?vmName=my&sourceSite=site1&sourceOrg=org1&site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The total number of items in the database of the Cloud Service. |
|
|
Number of items skipped before retrieving the items. |
|
|
The maximum number of items that this query retrieves. |
|
|
A list of VM-level replications. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2837
{
"items" : [ {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"total" : 1,
"offset" : 0,
"limit" : 100
}
Get the VM Replications for an SLA Profile
GET /vm-replications?slaProfileDisplayName=<sla-profile-display-name>
lists all configured VM-level replications that are all
assigned a given SLA Profile.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Request parameters
Parameter | Description |
---|---|
|
When present, returned replications are filtered by replication owner. Filtering option available only to admins. |
|
When present, returned replications will be source site short name. Local site filtering is not supported. |
|
When present, returned replications are filtered by source site type (e.g. vcloud/vcenter). |
|
When present, returned replications are filtered by source vDC ID. |
|
When present, returned replications are filtered by source vDC name. |
|
When present, returned replications are filtered by VMware Cloud Director source org. |
|
When present, the administrators can filter by source vCenter Server instance ID. |
|
When present, returned replications are filtered by source source VM ID. |
|
When present, returned replications are filtered by Virtual Machine name. The VM name must contain the provided value. |
|
When present, returned replications will storage profile. |
|
When present, returned replications are filtered by destination org. |
|
When present, returned replications are filtered by destination vDC ID. |
|
When present, returned replications are filtered by destination vDC name. |
|
When present, returned replications are filtered by destination site type (e.g. vcloud/vcenter). |
|
When present, returned replications are filtered by destination recovered vAppId. |
|
When present, admins can filter by vCenter instance ID. |
|
When present, admins can filter by datastore moid. vimServerInstanceUuid is required. |
|
When present, returned replications are filtered by replication type: migration or protection. |
|
When present, the SLA Profile to use instead of the custom rpo/dataConnectionType/retentionPolicy settings. |
|
When present, the displayName of the SLA Profile used by a replication. |
|
When present, less-than filtering will be applied. |
|
When present, greater-than filtering will be applied. |
|
When present, returned replications are filtered by their overall health. |
|
When present, returned replications are filtered by their data connection state. |
|
When present, returned replications are filtered by source VMware Cloud Director org shortname. Comma-separated Cloud replication ids are expected. |
|
An optional list of comma-separated fields, used to sort the result.The default sorting direction is ascending. When a field finishes with a hyphen, the direction for this field will be descending. This allows chaining e.g. col,col2-,col3 will result in sorting by col (asc), then by col2 (desc) and finally by col3 (asc). Supported fields: [vmName, sourceSite, sourceOrg, sourceVdcName, site, destinationOrg, destinationVdcName, owner, lastUpdated]. If this field is omitted, the result is sorted by start time in descending order. |
|
Number of items skipped before retrieving the items. By default, 0 if skipped. |
|
Query limit - maximum number of items this query should retrieve. When omitted or higher than the server’s limits, defaults to 100. |
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vm-replications?slaProfileDisplayName=Gold HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications?slaProfileDisplayName=Gold' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The total number of items in the database of the Cloud Service. |
|
|
Number of items skipped before retrieving the items. |
|
|
The maximum number of items that this query retrieves. |
|
|
A list of VM-level replications. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2816
{
"items" : [ {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : null,
"vmDescription" : null,
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"total" : 1,
"offset" : 0,
"limit" : 100
}
Get the Details of a VM Replication
GET /vm-replications/{replicationId}
returns the details for an individual VM replication.
Available since: v3.5
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3?site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2575
{
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}
Get the Instances of a VM Replication
GET /vm-replications/{replicationId}/instances
lists the replication instances for an individual VM-level replication.
Available since: v2
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/instances?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/instances?site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
List of replication instances. |
|
|
The identifier of the replication instance. |
|
|
Sequence number of the replication instance in HBR server. |
|
|
Represents if the instance is pinned or not (not affected by retention policy). |
|
|
Timestamp of the replication instance in HBR server. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
Amount of data transferred to form the replication instance. |
|
|
Time taken to transfer the data for the replication instance. |
|
|
Type of quiescing mode used for the replication instance. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 236
[ {
"key" : "replica-52f3e775-a8fa-13e3-e9be-39264ed2dfe2",
"sequenceNumber" : 11,
"timestamp" : 1469701818743,
"transferBytes" : 512000,
"transferSeconds" : 4,
"quiescedType" : "fileSystemQuiesced",
"isPinned" : false
} ]
Get the Details of a VM Replication Instance
GET /vm-replications/{replicationId}/instances/{instanceId}
returns the details of a replication instance
for an individual VM-level replication.
Available since: v3.5
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
|
Instance key. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/instances/replica-52f3e775-a8fa-13e3-e9be-39264ed2dfe2?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/instances/replica-52f3e775-a8fa-13e3-e9be-39264ed2dfe2?site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The identifier of the replication instance. |
|
|
Sequence number of the replication instance in HBR server. |
|
|
Represents if the instance is pinned or not (not affected by retention policy). |
|
|
Timestamp of the replication instance in HBR server. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
Amount of data transferred to form the replication instance. |
|
|
Time taken to transfer the data for the replication instance. |
|
|
Type of quiescing mode used for the replication instance. |
|
|
An array of disks included in the instance. |
|
|
Disk device key. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 280
{
"key" : "replica-52f3e775-a8fa-13e3-e9be-39264ed2dfe2",
"sequenceNumber" : 11,
"timestamp" : 1469701818743,
"transferBytes" : 512000,
"transferSeconds" : 4,
"quiescedType" : "fileSystemQuiesced",
"disksInfo" : [ {
"diskKey" : 2000
} ],
"isPinned" : false
}
Get the Historical Traffic Statistics of a VM Replication
GET /vm-replications/{replicationId}/traffic
returns the historical replication traffic statistics for a VM replication.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
The VM replication ID. |
Request parameters
Parameter | Description |
---|---|
|
The desired interval between the samples. Defaults to 'HOUR'. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
The timestamp (in msec) of the historical moment from which samples are retrieved. By default, 24 hours ago. |
|
The timestamp (in msec) of the moment up to which samples are retrieved. By default, 'now'. |
Request structure
GET /vm-replications/C4-09b2917c-bbe9-4693-ae3f-95b43a94b244/traffic?interval=HOUR&start=1563451200000&end=1563458400000 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-09b2917c-bbe9-4693-ae3f-95b43a94b244/traffic?interval=HOUR&start=1563451200000&end=1563458400000' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The object for which historic data is collected. |
|
|
The interval between the samples. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
|
The timestamp (in msec) of the historical moment from which samples are retrieved. |
|
|
The timestamp (in msec) of the moment up to which samples are retrieved. |
|
|
The samples. |
|
|
The timestamp (in msec) of the moment when the sample is collected. |
|
|
The value of the sample at that moment. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 336
{
"label" : "C4-09b2917c-bbe9-4693-ae3f-95b43a94b244",
"interval" : "HOUR",
"start" : 1563451200000,
"end" : 1563458400000,
"samples" : [ {
"timestamp" : 1563451200000,
"bytes" : 27950.0
}, {
"timestamp" : 1563454800000,
"bytes" : 54023.0
}, {
"timestamp" : 1563458400000,
"bytes" : 52236.0
} ]
}
Get the Historical Disk Usage Statistics of a VM Replication
GET /vm-replications/{replicationId}/disk-usage
returns the historic replication disk isage statistics for a VM replication.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
The VM replication ID. |
Request parameters
Parameter | Description |
---|---|
|
The desired interval between the samples. Defaults to 'HOUR'. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
The timestamp (in msec) of the historical moment from which samples are retrieved. By default, 24 hours ago. |
|
The timestamp (in msec) of the moment up to which samples are retrieved. By default, 'now'. |
Request structure
GET /vm-replications/C4-09b2917c-bbe9-4693-ae3f-95b43a94b244/disk-usage?interval=HOUR&start=1563451200000&end=1563458400000 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-09b2917c-bbe9-4693-ae3f-95b43a94b244/disk-usage?interval=HOUR&start=1563451200000&end=1563458400000' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The object for which historic data is collected. |
|
|
The interval between the samples. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
|
The timestamp (in msec) of the historical moment from which samples are retrieved. |
|
|
The timestamp (in msec) of the moment up to which samples are retrieved. |
|
|
The samples. |
|
|
The timestamp (in msec) of the moment when the sample is collected. |
|
|
The value of the sample at that moment. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 336
{
"label" : "C4-09b2917c-bbe9-4693-ae3f-95b43a94b244",
"interval" : "HOUR",
"start" : 1563451200000,
"end" : 1563458400000,
"samples" : [ {
"timestamp" : 1563451200000,
"bytes" : 27950.0
}, {
"timestamp" : 1563454800000,
"bytes" : 54023.0
}, {
"timestamp" : 1563458400000,
"bytes" : 52236.0
} ]
}
Get the Hardware Information of a Replicated VM
GET /vm-replications/{replicationId}/virtual-hardware
returns basic hardware information about the replicated VM.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
ID of the replication. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/virtual-hardware?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/virtual-hardware?site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
Number of virtual CPUs in the VM. When not available, returns -1. |
|
|
Number of virtual CPU cores per socket. When not available, returns 'null'. |
|
|
VM memory (in megabytes). When not available, returns -1. |
|
|
The sum (in megabytes) of the capacities of each source disk being replicated. When not available, returns 'null'. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 84
{
"cpus" : 4,
"coresPerSocket" : 1,
"memoryMB" : 8192,
"storageMB" : 10240
}
Stop a VM Replication
DELETE /vm-replications/{replicationId}
stops a VM replication and removes all disks associated with the replication.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
DELETE /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3?site=site2' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
None. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 492
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "stop",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : null,
"result" : null,
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Synchronize a VM Replication
POST /vm-replications/{replicationId}/sync
synchronizes a VM replication.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the replication to pause. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/sync?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Type: application/x-www-form-urlencoded
site=site2
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/sync?site=site2' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
Up-to-date Cloud VM replication info. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3278
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "sync",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Pause a VM Replication
POST /vm-replications/{replicationId}/pause
pauses the replication process if it is running.
If the replication process is in an incompatible state, the request fails. If the replication process is already paused, the request succeeds without performing anything.
Until the replication is resumed, the following operations are disabled:
-
automatic sync
-
manual sync
-
test failover with explicit sync
-
planned migration
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the replication to pause. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/pause?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Type: application/x-www-form-urlencoded
site=site2
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/pause?site=site2' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
Up-to-date Cloud VM replication info. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3279
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "pause",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Resume a VM Replication
POST /vm-replications/{replicationId}/resume
resumes a VM replication.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the replication to resume. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/resume?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Type: application/x-www-form-urlencoded
site=site2
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/resume?site=site2' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
Up-to-date Cloud VM replication info. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3280
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "resume",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
A VM Replication Failover
POST /vm-replications/{replicationId}/failover
fails over the VM to the destination site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcloud' in this case. |
|
|
Optional ID of a rotated instance to recover to. By default the latest instance is used. |
|
|
Optional parameter to specify whether rotated instances should be consolidated or nothing should happen in the recovered VM. Defaults to false. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Network settings for replication vApp result due to failover/migrate or test failover. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. |
|
|
When present, the source vApp network is isolated one. |
|
|
UUID of the source org vDC network. |
|
|
Name of the source org vDC network. |
|
|
When present, the destination vApp network is isolated one. |
|
|
UUID of the destination org vDC network. |
|
|
Name of the destination org vDC network. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. |
|
|
Network Settings for Virtual Machine. |
|
|
Primary NIC index. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
In case MANUAL IpAddressAllocationMode (below) is selected, then this holds the IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source Vm NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 1113
{
"type" : "vcloud",
"powerOn" : false,
"consolidate" : false,
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcloud",
"powerOn" : false,
"consolidate" : false,
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3347
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failover",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vcdVmId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"type" : "vcd",
"recoveryState" : "COMPLETE"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
A VM Replication Failover to On-Premises
POST /vm-replications/{replicationId}/failover
fails over a cloud VM to the destination on-premises site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcenter' in this case. |
|
|
Optional ID of a rotated instance to recover to. By default the latest instance is used. |
|
|
Optional parameter to specify whether the existing preceding rotated instances should be exposed as snapshots, whether the rotated instances should be consolidated or nothing should happen in the recovered VM.Can be [DO_NOTHING, EXPOSE_PITS, CONSOLIDATE]. Defaults to EXPOSE_PITS. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Specifies hw changes to be performed on the recovered VM. This or any of the hw changes are optional. |
|
|
Number of vCPUs of the recovered VM. If not specified it will be the same as the source VM. |
|
|
Number of cores per socket. If not specified it will be the same as the source VM. |
|
|
Memory in MB. If not specified it will be the same as the source VM. |
|
|
Whether to change the MAC addresses of all network devices. If unset no changes will be performed. If the recovered VM hits instance uuid collision new MAC addresses will be generated by vCenter. Valid values are [DEFAULT, GENERATE_NEW]. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 281
{
"type" : "vcenter",
"powerOn" : true,
"snapshotOptions" : "EXPOSE_PITS",
"customVirtualHardware" : {
"numCpus" : 2,
"numCoresPerSocket" : 4,
"memoryInMB" : 2048,
"macAddressPolicy" : "DEFAULT"
},
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcenter",
"powerOn" : true,
"snapshotOptions" : "EXPOSE_PITS",
"customVirtualHardware" : {
"numCpus" : 2,
"numCoresPerSocket" : 4,
"memoryInMB" : 2048,
"macAddressPolicy" : "DEFAULT"
},
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3347
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failover",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vcdVmId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"type" : "vcd",
"recoveryState" : "COMPLETE"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Test a VM Replication Failover
POST /vm-replications/{replicationId}/failover-test
tests the VM failover to the destination site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcloud' in this case. |
|
|
Optional ID of a rotated instance to recover to. By default the latest instance is used. Cannot be used together with the 'sync' parameter set to true. |
|
|
Whether automatic synchronization should be performed before the failover test. Cannot be set to 'true' if the 'instanceId' parameter is populated. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Network settings for replication vApp result due to failover/migrate or test failover. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. |
|
|
When present, the source vApp network is isolated one. |
|
|
UUID of the source org vDC network. |
|
|
Name of the source org vDC network. |
|
|
When present, the destination vApp network is isolated one. |
|
|
UUID of the destination org vDC network. |
|
|
Name of the destination org vDC network. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. |
|
|
Network Settings for Virtual Machine. |
|
|
Primary NIC index. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
In case MANUAL IpAddressAllocationMode (below) is selected, then this holds the IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source Vm NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 1106
{
"type" : "vcloud",
"powerOn" : false,
"sync" : false,
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcloud",
"powerOn" : false,
"sync" : false,
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3347
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failoverTest",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vcdVmId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"type" : "vcd",
"recoveryState" : "TEST"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Delete the Test Failover VM Replication
DELETE /vm-replications/{replicationId}/failover-test
cleans up the test failover VM.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
DELETE /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3293
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failoverTestCleanup",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Test a VM Replication Failover to On-Premises
POST /vm-replications/{replicationId}/failover-test
tests failing over the VM to the destination on-premises site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud to-VC replication identifier. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcenter' in this case. |
|
|
Whether automatic synchronization should be performed before the failover test. Cannot be set to 'true' if the 'instanceId' parameter is populated. |
|
|
Optional ID of a rotated instance to recover to. By default the latest instance is used. Cannot be used together with the 'sync' parameter set to true. |
|
|
Optional parameter to specify whether the existing preceding rotated instances should be exposed as snapshots or nothing should happen in the test VM. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Specifies hw changes to be performed on the recovered VM. This or any of the hw changes are optional. |
|
|
Number of vCPUs of the recovered VM. If not specified it will be the same as the source VM. |
|
|
Number of cores per socket. If not specified it will be the same as the source VM. |
|
|
Memory in MB. If not specified it will be the same as the source VM. |
|
|
Whether to change the MAC addresses of all network devices. If unset no changes will be performed. If the recovered VM hits instance uuid collision new MAC addresses will be generated by vCenter. Valid values are [DEFAULT, GENERATE_NEW]. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 296
{
"type" : "vcenter",
"powerOn" : true,
"exposePITsAsSnapshots" : true,
"customVirtualHardware" : {
"numCpus" : 2,
"numCoresPerSocket" : 4,
"memoryInMB" : 4096,
"macAddressPolicy" : "DEFAULT"
},
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"sync" : false
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcenter",
"powerOn" : true,
"exposePITsAsSnapshots" : true,
"customVirtualHardware" : {
"numCpus" : 2,
"numCoresPerSocket" : 4,
"memoryInMB" : 4096,
"macAddressPolicy" : "DEFAULT"
},
"instanceId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"sync" : false
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3347
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failoverTest",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vcdVmId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"type" : "vcd",
"recoveryState" : "TEST"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Migrate a VM Replication
POST /vm-replications/{replicationId}/migrate
performs a planned migration for the specified replication.
The planned migration attempts to synchronize the latest changes of the source VM and then powers off the source VM. The source site must be available for the planned migration to succeed. If the source site is unavailable, try performing a failover instead.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcloud' in this case. |
|
|
Optional parameter to specify whether rotated instances should be consolidated or nothing should happen in the recovered VM. Defaults to false. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Network settings for replication vApp result due to failover/migrate or test failover. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. |
|
|
When present, the source vApp network is isolated one. |
|
|
UUID of the source org vDC network. |
|
|
Name of the source org vDC network. |
|
|
When present, the destination vApp network is isolated one. |
|
|
UUID of the destination org vDC network. |
|
|
Name of the destination org vDC network. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. |
|
|
Network Settings for Virtual Machine. |
|
|
Primary NIC index. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
In case MANUAL IpAddressAllocationMode (below) is selected, then this holds the IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source Vm NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/migrate?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 1056
{
"type" : "vcloud",
"powerOn" : false,
"consolidate" : false,
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/migrate?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcloud",
"powerOn" : false,
"consolidate" : false,
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3342
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "migrate",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vcdVmId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"type" : "vcd",
"recoveryState" : "TEST"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Migrate a VM Replication to On-Premises
POST /vm-replications/{replicationId}/migrate
performs a planned migration for the specified replication.
The planned migration attempts to synchronize the latest changes of the source VM and then powers off the source VM. The source site must be available for the planned migration to succeed. If the source site is unavailable, try performing a failover instead.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcenter' in this case. |
|
|
Optional parameter to specify whether the existing preceding rotated instances should be exposed as snapshots, whether the rotated instances should be consolidated or nothing should happen in the recovered VM.Can be [DO_NOTHING, EXPOSE_PITS, CONSOLIDATE]. Defaults to EXPOSE_PITS. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Specifies hw changes to be performed on the recovered VM. This or any of the hw changes are optional. |
|
|
Number of vCPUs of the recovered VM. If not specified it will be the same as the source VM. |
|
|
Number of cores per socket. If not specified it will be the same as the source VM. |
|
|
Memory in MB. If not specified it will be the same as the source VM. |
|
|
Whether to change the MAC addresses of all network devices. If unset no changes will be performed. If the recovered VM hits instance uuid collision new MAC addresses will be generated by vCenter. Valid values are [DEFAULT, GENERATE_NEW]. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/migrate HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 224
{
"type" : "vcenter",
"powerOn" : true,
"snapshotOptions" : "CONSOLIDATE",
"customVirtualHardware" : {
"numCpus" : 2,
"numCoresPerSocket" : 4,
"memoryInMB" : 4096,
"macAddressPolicy" : "DEFAULT"
}
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/migrate' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcenter",
"powerOn" : true,
"snapshotOptions" : "CONSOLIDATE",
"customVirtualHardware" : {
"numCpus" : 2,
"numCoresPerSocket" : 4,
"memoryInMB" : 4096,
"macAddressPolicy" : "DEFAULT"
}
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3346
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "migrate",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vcdVmId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"type" : "vcd",
"recoveryState" : "COMPLETE"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Reverse a VM Replication
POST /vm-replications/{replicationId}/reverse
reverses the VM replication.
By using a failover or a planned migration, the reversed replication needs to be recovered. A new VM replication is created in the oposite direction. The disks of the original source VM are used as seeds. The original source VM is removed. The vApp of the original source VM is powered off and left intact without the VM.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the replication to reverse. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/reverse?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Type: application/x-www-form-urlencoded
site=site2
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/reverse?site=site2' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
Replication info of the reversed replication. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3281
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "reverse",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Configure the Settings of a VM Replication
PATCH /vm-replications/{replicationId}
reconfigures the VM replication settings.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the replication to pause. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
The description of the replication. |
|
|
Recovery point objective in minutes - if empty/omitted no change will be applied. |
|
|
What Lightweight Delta Protocol traffic mode is supported. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. |
|
|
Replicated image guest quiescing - if empty/omitted no change will be applied. |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Settings for reconfiguring the source. |
|
|
Either 'vcVappReconfigure' or 'vcVmReconfigure'. |
|
|
The name of the vApp into which the replicated VMs will be imported. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
Boot order number of the VM. |
|
|
Start action of the VM. |
|
|
Start delay for the VM in milliseconds. |
|
|
Stop action of the VM. |
|
|
Stop delay for the VM in milliseconds. |
|
|
When omitted old SLA profile ID will be used (if any) or if rpo, dataConnectionType, quiesced or retentionPolicy are specified old SLA profile will be discarded and custom settings will be used. |
Request structure
PATCH /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 541
{
"description" : "new description",
"rpo" : 15,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 1,
"distance" : 5
} ]
},
"sourceReconfigure" : {
"type" : "vcVmReconfigure",
"vappName" : "vapName",
"vmStartupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
}
},
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3?site=site2' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"description" : "new description",
"rpo" : 15,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 1,
"distance" : 5
} ]
},
"sourceReconfigure" : {
"type" : "vcVmReconfigure",
"vappName" : "vapName",
"vmStartupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
}
},
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
Up-to-date Cloud VM replication info. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3285
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "reconfigure",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Configure the Disks of a VM Replication
PATCH /vm-replications/{replicationId}/disks
reconfigures the set of replicated VM disks.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the replication to pause. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
The new set of excluded disk device keys. |
Request structure
PATCH /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/disks?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 8
[ 2000 ]
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/disks?site=site2' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '[ 2000 ]'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
Up-to-date Cloud VM replication info. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3290
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "reconfigureDisks",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Configure the Owner of a VM Replication
PATCH /vm-replications/{replicationId}/chown
allows administrators
to change the owner of the specified VM replication.
By default, the replications are owned by the user that started them. Any replications started by an administrator are not visible to the involved organization, unless the administrator explicitly changes the ownership of the replication to the organization.
Alternatively, an administrator may sometimes temporarily take ownership of a replication to prevent the tenant from seeing or managing the replication while troubleshooting or emergency recovery is ongoing.
Changing the VM replication owner sets the parent vApp replication to the same owner.
Available since: v2
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the VM replication. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Optional owner of the replication, if omitted the currently logged in user becomes the owner. |
Request structure
PATCH /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/chown?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 28
{
"owner" : "org1@site1"
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/chown?site=site2' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"owner" : "org1@site1"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
ID of the corresponding vApp replication. |
|
|
The ID of the user that owns the replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Source vApp display name. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2575
{
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "*",
"storageProfileName" : "Default",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}
Get the Network Settings of a VM Replication
GET /vm-replications/{replicationId}/network-settings
returns the network settings of
the failover and test failover for the specified VM replication.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud VM-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/network-settings HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/network-settings' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
ID. |
|
|
name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2186
{
"failoverSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
},
"failoverTestSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
}
Configure the Network Settings of a VM Replication
PUT /vm-replications/{replicationId}/network-settings
applies the specified network settings to the VM replication.
Available since: v4.1
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the replication to reconfigure. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
ID. |
|
|
name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
Request structure
PUT /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/network-settings?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 2186
{
"failoverSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
},
"failoverTestSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/network-settings?site=site2' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"failoverSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
},
"failoverTestSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
VM network settings. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
ID. |
|
|
name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2903
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "/vm-replications/{replicationId}/network-settings",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VmReplicationNetworkSettings",
"result" : {
"failoverSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
},
"failoverTestSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Configure the Storage Profile of a VM Replication
POST /vm-replications/{replicationId}/storage-profile
applies the specified storage profile to the VM replication.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the VM replication to apply the storage profile to. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
The ID of the storage profile to apply to the VM replication. If you specify 'null' the current storage profile is applied again and causes changes in the existing storage profile made in vCenter Server to take effect, possibly migrating the replication and its related independent disks to a new datastore. |
Request structure
POST /vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/storage-profile?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 65
{
"storageProfileId" : "91932be0-b038-4667-a9ed-cefa4c08d7f4"
}
Example request
$ curl 'https://localhost:8046/vm-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/storage-profile?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"storageProfileId" : "91932be0-b038-4667-a9ed-cefa4c08d7f4"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
Up-to-date Cloud VM replication info. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3317
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "reconfigure",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "SingleVmReplicationInfo",
"result" : {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "91932be0-b038-4667-a9ed-cefa4c08d7f4",
"storageProfileName" : "Gold",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New vApp Replication
POST /vapp-replications
starts a new vApp replication and configures a replication for each VM in the vApp.
For this multiple start VM-level replications trigger. For more information about VM replications, see "Start New VM Replication" section.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source vApp location and ID. |
|
|
Discriminator property, should be set to 'vapp' in this case. |
|
|
VMware Cloud Director site shortname. |
|
|
Source vApp ID in VMware Cloud Director. |
|
|
A list of device keys of the excluded disks for every VM. |
|
|
The ID of the VM for which the disks are to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
Destination location. |
|
|
Destination type. Set to 'vcloud' for this operation. |
|
|
VMware Cloud Director site shortname. |
|
|
The virtual data center in VMware Cloud Director in the destination site. |
|
|
Optional storage profile to use to determine placement of replicated files. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vapp-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 692
{
"source" : {
"type" : "vapp",
"site" : "site1",
"vappId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmExcludedDisks" : {
"vmId1" : [ 1000, 2000 ]
}
},
"destination" : {
"type" : "vcloud",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vapp-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vapp",
"site" : "site1",
"vappId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmExcludedDisks" : {
"vmId1" : [ 1000, 2000 ]
}
},
"destination" : {
"type" : "vcloud",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5979
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New vApp Replication with Seed
POST /vapp-replications
starts a new vApp replication with offline seed disks and configures a replication
for each VM in the vApp.
For this multiple start VM-level replications trigger. For more information about VM replications, see "Start New VM Replication" section.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source vApp location and ID. |
|
|
Discriminator property, should be set to 'vapp' in this case. |
|
|
VMware Cloud Director site shortname. |
|
|
Source vApp ID in VMware Cloud Director. |
|
|
A list of device keys of the excluded disks for every VM. |
|
|
The ID of the VM for which the disks are to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
Destination location. |
|
|
Destination type. Set to 'vapp' for this operation. |
|
|
VMware Cloud Director site shortname. |
|
|
The virtual data center in VMware Cloud Director in the destination site. |
|
|
Optional storage profile to use to determine placement of replicated files. |
|
|
ID of the vApp to use as offline copy. Note: the seed vApp will have all its VMs deleted, and only their disks will be used as seed. The vApp will be left behind empty and a new one will be created on failover. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vapp-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 749
{
"source" : {
"type" : "vapp",
"site" : "site1",
"vappId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmExcludedDisks" : {
"vmId1" : [ 1000, 2000 ]
}
},
"destination" : {
"type" : "vapp",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*",
"seedVappId" : "107102e0-e03b-404e-8e17-0688c657a74b"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vapp-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vapp",
"site" : "site1",
"vappId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmExcludedDisks" : {
"vmId1" : [ 1000, 2000 ]
}
},
"destination" : {
"type" : "vapp",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*",
"seedVappId" : "107102e0-e03b-404e-8e17-0688c657a74b"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5979
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New vApp Replication from On-Premises
POST /vapp-replications
starts a new vApp replication and configures a replication for each VM in the vApp.
For this multiple start VM-level replications trigger. For more information about VM replications, "Start New VM Replication" section.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
The location and ID of the source VMs. |
|
|
Discriminator property, should be set to 'vcVapp' in this case. |
|
|
The shortname of the on-premises site. |
|
|
The UUID of the source vCenter Server. |
|
|
The name of the vApp to use for failover. |
|
|
List of IDs of VMs to protect. |
|
|
Optional vmId-to-vmStartupInfo mapping (aka boot order/delay) for V2C case. |
|
|
A list of device keys of the excluded disks for every VM. |
|
|
The ID of the VM for which the disks are to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
Destination location. |
|
|
Destination type. Set to 'vcloud' for this operation. |
|
|
VMware Cloud Director site shortname. |
|
|
The virtual data center in VMware Cloud Director in the destination site. |
|
|
Optional storage profile to use to determine placement of replicated files. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vapp-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 778
{
"source" : {
"type" : "vcVapp",
"site" : "onprem1",
"vcUuid" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vappName" : "vapp1",
"vmIds" : [ "vm1", "vm2" ],
"vmStartupInfoMap" : { },
"vmExcludedDisks" : {
"vmId1" : [ 1000 ]
}
},
"destination" : {
"type" : "vcloud",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vapp-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vcVapp",
"site" : "onprem1",
"vcUuid" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vappName" : "vapp1",
"vmIds" : [ "vm1", "vm2" ],
"vmStartupInfoMap" : { },
"vmExcludedDisks" : {
"vmId1" : [ 1000 ]
}
},
"destination" : {
"type" : "vcloud",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5979
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New vApp Replication with Seed from On-Premises
POST /vapp-replications
starts a new vApp replication with offline seed disks and configures a replication
for each VM in the vApp.
For this multiple start VM-level replications trigger. For more information about VM replications, see "Start New VM Replication" section.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
The location and ID of the source VMs. |
|
|
Discriminator property, should be set to 'vcVapp' in this case. |
|
|
The shortname of the on-premises site. |
|
|
The UUID of the source vCenter Server. |
|
|
The name of the vApp to use for failover. |
|
|
List of IDs of VMs to protect. |
|
|
Optional vmId-to-vmStartupInfo mapping (aka boot order/delay) for V2C case. |
|
|
A list of device keys of the excluded disks for every VM. |
|
|
The ID of the VM for which the disks are to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
Destination location. |
|
|
Destination type. Set to 'vapp' for this operation. |
|
|
VMware Cloud Director site shortname. |
|
|
The virtual data center in VMware Cloud Director in the destination site. |
|
|
Optional storage profile to use to determine placement of replicated files. |
|
|
ID of the vApp to use as offline copy. Note: the seed vApp will have all its VMs deleted, and only their disks will be used as seed. The vApp will be left behind empty and a new one will be created on failover. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vapp-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 835
{
"source" : {
"type" : "vcVapp",
"site" : "onprem1",
"vcUuid" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vappName" : "vapp1",
"vmIds" : [ "vm1", "vm2" ],
"vmStartupInfoMap" : { },
"vmExcludedDisks" : {
"vmId1" : [ 1000 ]
}
},
"destination" : {
"type" : "vapp",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*",
"seedVappId" : "107102e0-e03b-404e-8e17-0688c657a74b"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vapp-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vcVapp",
"site" : "onprem1",
"vcUuid" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vappName" : "vapp1",
"vmIds" : [ "vm1", "vm2" ],
"vmStartupInfoMap" : { },
"vmExcludedDisks" : {
"vmId1" : [ 1000 ]
}
},
"destination" : {
"type" : "vapp",
"site" : "site2",
"vdc" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"storageProfile" : "*",
"seedVappId" : "107102e0-e03b-404e-8e17-0688c657a74b"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5979
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New vApp Replication to On-Premises
POST /vapp-replications
starts a new vApp replication and configures a replication for each VM in the vApp.
For this multiple start VM-level replications trigger. For more information about VM replications, see "Start New VM Replication" section.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source vApp location and ID. |
|
|
Discriminator property, should be set to 'vapp' in this case. |
|
|
VMware Cloud Director site shortname. |
|
|
Source vApp ID in VMware Cloud Director. |
|
|
A list of device keys of the excluded disks for every VM. |
|
|
The ID of the VM for which the disks are to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
Destination location. |
|
|
Destination type. Set to 'vc' for this operation. |
|
|
The shortname of the on-premises site. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vapp-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 610
{
"source" : {
"type" : "vapp",
"site" : "site1",
"vappId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmExcludedDisks" : {
"vmId1" : [ 1000, 2000 ]
}
},
"destination" : {
"type" : "vc",
"site" : "onprem1"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vapp-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vapp",
"site" : "site1",
"vappId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmExcludedDisks" : {
"vmId1" : [ 1000, 2000 ]
}
},
"destination" : {
"type" : "vc",
"site" : "onprem1"
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5979
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Start New vApp Replication with Seed to On-Premises
POST /vapp-replications
starts a new vApp replication with offline seed disks and configures a replication
for each VM in the vApp.
For this multiple start VM-level replications trigger. For more information about VM replications, see "Start New VM Replication" section.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Source vApp location and ID. |
|
|
Discriminator property, should be set to 'vapp' in this case. |
|
|
VMware Cloud Director site shortname. |
|
|
Source vApp ID in VMware Cloud Director. |
|
|
A list of device keys of the excluded disks for every VM. |
|
|
The ID of the VM for which the disks are to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
The device key of the disk to be excluded. |
|
|
Destination location. |
|
|
Destination type. Set to 'vcVapp' for this operation. |
|
|
The shortname of the on-premises site. |
|
|
Ids of the VMs to use as offline copy. Note: the VMs will be deleted, and only their disks will be used as seed. |
|
|
ID of the target VC. |
|
|
MOREF of the target VM. |
|
|
User-supplied description of this replication. |
|
|
Recovery Point Objective. |
|
|
Lightweight Delta Protocol traffic configuration. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. Defaults to ENCRYPTED_COMPRESSED. |
|
|
Whether to attempt to quiesce the Guest OS. Requires Guest Tools to be installed and running in the replicated VM. Defaults to true (quesce the Guest OS). |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Optional type of virtual disks created on DR site. Possible values are: [THIN, PREALLOCATED, PREALLOCATED_ZEROS]. Default value is: THIN. |
|
|
Replication initial sync time. If in the past, 0 or negative, the sync will start immediately. The time is specified as the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
ID of SLA profile to use for the settings. |
Request structure
POST /vapp-replications?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 870
{
"source" : {
"type" : "vapp",
"site" : "site1",
"vappId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmExcludedDisks" : {
"vmId1" : [ 1000, 2000 ]
}
},
"destination" : {
"type" : "vcVapp",
"site" : "onprem1",
"seedVms" : [ {
"vcId" : "107102e0-e03b-404e-8e17-0688c657a74b",
"moId" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2"
}, {
"vcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"moId" : "d358c030-255b-43e8-89d7-e509cee48348"
} ]
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vapp-replications?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"source" : {
"type" : "vapp",
"site" : "site1",
"vappId" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"vmExcludedDisks" : {
"vmId1" : [ 1000, 2000 ]
}
},
"destination" : {
"type" : "vcVapp",
"site" : "onprem1",
"seedVms" : [ {
"vcId" : "107102e0-e03b-404e-8e17-0688c657a74b",
"moId" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2"
}, {
"vcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"moId" : "d358c030-255b-43e8-89d7-e509cee48348"
} ]
},
"description" : "A Protected Workload",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"targetDiskType" : "THIN",
"initialSyncTime" : 0,
"isMigration" : false,
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5979
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "start",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Pause a vApp Replication
POST /vapp-replications/{replicationId}/pause
pauses the replication for each replicated VM in the vApp.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication to pause. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/pause?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Type: application/x-www-form-urlencoded
site=site2
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/pause?site=site2' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5986
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "pause",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Resume a vApp Replication
POST /vapp-replications/{replicationId}/resume
resumes the replication for each replicated VM in the vApp.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication to resume. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/resume?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Type: application/x-www-form-urlencoded
site=site2
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/resume?site=site2' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5987
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "resume",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Synchronize a vApp Replication
POST /vapp-replications/{replicationId}/sync
performs a VM-level synchronization for each replicated VM in the vApp.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication to resume. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/sync?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Type: application/x-www-form-urlencoded
site=site2
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/sync?site=site2' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5985
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "sync",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Stop a vApp Replication
DELETE /vapp-replications/{replicationId}
stops the specified vApp replication.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
DELETE /vapp-replications/C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963?site=site2' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
None. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 498
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "stop",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : null,
"result" : null,
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Get the vApp Replications
GET /vapp-replications
lists the the configured vApp-level replications.
Available since: v3.5
Required roles: One of EVERYONE, PEER_MONITORING
Request parameters
Parameter | Description |
---|---|
|
When present, returned replications are filtered by replication owner. Filtering option available only to admins. |
|
When present, returned replications are filtered by source site short name. You cannot use local site filtering. |
|
When present, returned replications are filtered by source site type. Either 'vcloud' or 'vcenter'. |
|
When present, returned replications are filtered by source vDC ID. |
|
When present, returned replications are filtered by source vDC name. |
|
When present, returned replications are filtered by VMware Cloud Director source org. |
|
When present, returned replications are filtered by source vApp ID. |
|
When present, returned replications are filtered by destination org. |
|
When present, returned replications are filtered by destination vDC ID. |
|
When present, returned replications are filtered by destination vDC name. |
|
When present, returned replications are filtered by destination site type (e.g. vcloud/vcenter). |
|
When present, returned replications are filtered by destination recovered vAppId. |
|
When present, returned replications are filtered by VMware Cloud Director vApp name. The vApp name must contain the provided value. |
|
When present, only replications for which management operations that were performed no later than the specified date are returned. |
|
When present, only replications for which management operations that were performed after the specified date are returned. |
|
When present, returned replications' IDs will be in the given list. Comma-separated Cloud replication ids are expected. |
|
An optional list of comma-separated fields, used to sort the result. The default sorting direction is ascending. When a field finishes with a hyphen, the sorting direction for this field is descending. To chain, for example: col,col2-,col3 sorts by col (asc), then by col2 (desc), and finally by col3 (asc). Supported fields: [vappName, sourceSite, sourceOrg, sourceVdcName, site, destinationOrg, destinationVdcName, owner, lastUpdated]. If this field is omitted, the result is sorted by start time in descending order. |
|
Number of items skipped before retrieving the items. By default, 0 if skipped. |
|
Query limit - maximum number of items this query should retrieve. When omitted or higher than the server’s limits, defaults to 100. |
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vapp-replications?vappName=my%2520vapp&sourceSite=site1&sourceOrg=org1&site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vapp-replications?vappName=my%2520vapp&sourceSite=site1&sourceOrg=org1&site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The total number of items in the database of the Cloud Service. |
|
|
Number of items skipped before retrieving the items. |
|
|
The maximum number of items that this query retrieves. |
|
|
A list of vApp-level replications. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5542
{
"items" : [ {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
} ],
"total" : 1,
"offset" : 0,
"limit" : 100
}
Get the Details of a vApp Replication
GET /vapp-replications/{replicationId}
returns the details of an individual vApp-level replication.
Available since: v3.5
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vapp-replications/C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963?site=site2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5114
{
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
}
Configure the Settings of a vApp Replication
PATCH /vapp-replications/{replicationId}
reconfigures the specified vApp replication settings.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication to reconfigure. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
The description of the replication. |
|
|
Recovery point objective in minutes - if empty/omitted no change will be applied. |
|
|
What Lightweight Delta Protocol traffic mode is supported. Can be [PLAIN, ENCRYPTED, ENCRYPTED_COMPRESSED]. |
|
|
Replicated image guest quiescing - if empty/omitted no change will be applied. |
|
|
Replication instance retention policy - the number of instances and for how long to store them. |
|
|
The set of rules building up the retention policy. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Settings for reconfiguring the source. |
|
|
Either 'vcVappReconfigure' or 'vcVmReconfigure'. |
|
|
The name of the vApp into which the replicated VMs will be imported. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
Boot order number of the VM. |
|
|
Start action of the VM. |
|
|
Start delay for the VM in milliseconds. |
|
|
Stop action of the VM. |
|
|
Stop delay for the VM in milliseconds. |
|
|
When omitted old SLA profile ID will be used (if any) or if rpo, dataConnectionType, quiesced or retentionPolicy are specified old SLA profile will be discarded and custom settings will be used. |
Request structure
PATCH /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 541
{
"description" : "new description",
"rpo" : 15,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 1,
"distance" : 5
} ]
},
"sourceReconfigure" : {
"type" : "vcVmReconfigure",
"vappName" : "vapName",
"vmStartupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
}
},
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3?site=site2' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"description" : "new description",
"rpo" : 15,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 1,
"distance" : 5
} ]
},
"sourceReconfigure" : {
"type" : "vcVmReconfigure",
"vappName" : "vapName",
"vmStartupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
}
},
"slaProfileId" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5992
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "reconfigure",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Configure the Disks of a vApp Replication
PATCH /vapp-replications/{replicationId}/disks
reconfigures the set of replicated disks of the specified vApp replication.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication to reconfigure. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
An excluded disk map of the VM replication. If the VM replication is not present in the map, the configuration does not change. |
Request structure
PATCH /vapp-replications/C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963/disks?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 58
{
"C4-11111111-af9d-446a-8599-5b693842c4a3" : [ 2000 ]
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963/disks?site=site2' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"C4-11111111-af9d-446a-8599-5b693842c4a3" : [ 2000 ]
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5992
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "reconfigure",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Configure the Owner of a vApp Replication
PATCH /vapp-replications/{replicationId}/chown
allows administrators to change the owner of the specified vApp replication.
By default, the replications are owned by the user that started them. Any replications started by an administrator are not visible to the involved organization, unless the administrator explicitly changes the ownership of the replication to the organization.
Alternatively, an administrator may sometimes temporarily take ownership of a replication to prevent the tenant from seeing or managing the replication while troubleshooting or emergency recovery is ongoing.
Changing the vApp replication owner sets the child VM replications to the same owner.
Available since: v2
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Optional owner of the replication, if omitted the currently logged in user becomes the owner. |
Request structure
PATCH /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/chown?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 28
{
"owner" : "org1@site1"
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/chown?site=site2' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"owner" : "org1@site1"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5114
{
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
}
Get the Network Settings of a vApp Replication
GET /vapp-replications/{replicationId}/network-settings
returns the network settings of the failover and
the test failover for the specified vApp replication.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp-level replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vapp-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/network-settings HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vapp-replications/C4-ec991bd5-af9d-446a-8599-5b693842c4a3/network-settings' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2302
{
"failoverSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"vmId1" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
},
"failoverTestSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"vmId1" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
}
}
Configure the Network Settings of a vApp Replication
PUT /vapp-replications/{replicationId}/network-settings
applies the specified network settings to the vApp replication.
Available since: v4.1
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication to reconfigure. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
Request structure
PUT /vapp-replications/C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963/network-settings?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 2302
{
"failoverSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"vmId1" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
},
"failoverTestSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"vmId1" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
}
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963/network-settings?site=site2' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"failoverSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"vmId1" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
},
"failoverTestSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"vmId1" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
}
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp network settings. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already). This is more in the line where new vApp networks are created (for V2C this is the case, but can also be applied for C2C as well). |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. This name will be used for the name of the vApp network in the destination, unless the fence mode is bridge in which case the vApp network name must match the name of the destination OrgVdc network and this name will be ignored. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The source OrgVdcNetwork the source vApp network is connected to. When omitted, the source vApp network is isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
The destination OrgVdcNetwork to connect the resulting vApp network to. When omitted, the destination vApp network will be isolated one. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. It cannot be specified in combination with vmNetworkSettings. |
|
|
Network settings for each VM. VM NIC’s can be connected to the bridged OrgVdcNetworks (in future also to the internal vApp networks) or the VM NIC can be left isolated (not attached to any network). |
|
|
Primary NIC index. |
|
|
Network settings for the VM’s NIC. |
|
|
Index of the NIC starting from 0 in a VM. |
|
|
Indicates whether the NIC should be connected. |
|
|
Indicates whether the NIC MAC address should be reset (regenerated) or kept as it is. |
|
|
The name of the network to which the NIC is attached. |
|
|
IP address of the NIC. |
|
|
Ip Address allocation mode. Can be one of POOL, DHCP, MANUAL, NONE. |
|
|
If the network that the NIC is connected to has NAT or port mapping, the external address is populated in this element. |
|
|
NIC Adapter type. |
|
|
Flag to signify if the NIC needs customization. |
|
|
The MAC address of the NIC. |
|
|
Indicates whether the source VM NIC settings should be copied to the recovered VM. |
|
|
Optionally provide computer name. |
|
|
Optionally provide whether to enable guest customization. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 3039
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "/vapp-replications/{replicationId}/network-settings",
"resourceType" : "vappReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VAppReplicationNetworkSettings",
"result" : {
"failoverSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"vmId1" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
},
"failoverTestSettings" : {
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : {
"vmId1" : {
"primaryNicIndex" : 0,
"nics" : [ {
"nicIndex" : 0,
"isConnected" : true,
"resetMacAddress" : true,
"network" : "orgVdcNetwork1",
"ipAddress" : "192.168.0.101",
"ipAddressAllocationMode" : "DHCP",
"externalIpAddress" : "10.72.112.4",
"networkAdapterType" : "type1",
"needsCustomization" : false,
"macAddress" : "00:50:56:a9:0c:12"
} ],
"copySourceNicSettings" : true,
"computerName" : "testPc",
"enableGuestCustomization" : true
}
}
}
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Configure the Storage Profile of a vApp Replication
POST /vapp-replications/{replicationId}/storage-profile
applies the specified storage profle to the vApp replication.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication to apply the storage profile to. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
The ID of the storage profile to apply to the VM replication. If you specify 'null' the current storage profile is applied again and causes changes in the existing storage profile made in vCenter Server to take effect, possibly migrating the replication and its related independent disks to a new datastore. |
Request structure
POST /vapp-replications/C4-VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/storage-profile HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 65
{
"storageProfileId" : "91932be0-b038-4667-a9ed-cefa4c08d7f4"
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4-VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/storage-profile' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"storageProfileId" : "91932be0-b038-4667-a9ed-cefa4c08d7f4"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5958
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "reconfigure",
"resourceType" : "vmReplication",
"resourceId" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"resourceName" : "my vm 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "91932be0-b038-4667-a9ed-cefa4c08d7f4",
"storageProfileName" : "Gold",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "91932be0-b038-4667-a9ed-cefa4c08d7f4",
"storageProfileName" : "Gold",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
A vApp Replication Failover
POST /vapp-replications/{replicationId}/failover
fails over all the child VM replications in the vApp to the destination site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcloud' in this case. |
|
|
Optional map of replication to rotated instance to recover to. If the map is omitted or doesn’t contain instance(s) for 1 (or more) existing VM-level replications, the latest available instances will be used. |
|
|
Optional parameter to specify whether rotated instances should be consolidated or nothing should happen in the recovered VM. Defaults to false. |
|
|
Network settings for each VM. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Network settings for replication vApp result due to failover/migrate or test failover. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. |
|
|
When present, the source vApp network is isolated one. |
|
|
UUID of the source org vDC network. |
|
|
Name of the source org vDC network. |
|
|
When present, the destination vApp network is isolated one. |
|
|
UUID of the destination org vDC network. |
|
|
Name of the destination org vDC network. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 564
{
"type" : "vcloud",
"powerOn" : false,
"consolidate" : false,
"instanceMap" : { },
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : { }
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcloud",
"powerOn" : false,
"consolidate" : false,
"instanceMap" : { },
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : { }
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5989
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failover",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Test a vApp Replication Failover
POST /vapp-replications/{replicationId}/failover-test
tests the vApp failover to the destination site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcloud' in this case. |
|
|
Optional map of replication to rotated instances to recover to. If the map is omitted or doesn’t contain instance(s) for 1 (or more) existing VM-level replications, the latest available instances will be used. Cannot be used together with the 'sync' parameter set to true. |
|
|
Whether automatic synchronization should be performed before the failover test. Cannot be set to 'true' if the 'instanceMap' parameter is populated. |
|
|
Network settings for each VM. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Network settings for replication vApp result due to failover/migrate or test failover. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. |
|
|
When present, the source vApp network is isolated one. |
|
|
UUID of the source org vDC network. |
|
|
Name of the source org vDC network. |
|
|
When present, the destination vApp network is isolated one. |
|
|
UUID of the destination org vDC network. |
|
|
Name of the destination org vDC network. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 556
{
"type" : "vcloud",
"powerOn" : true,
"sync" : false,
"instanceMap" : { },
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : { }
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcloud",
"powerOn" : true,
"sync" : false,
"instanceMap" : { },
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : { }
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5989
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failover",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
A vApp Replication Failover to On-Premises
POST /vapp-replications/{replicationId}/failover
fails over all the child VM replications in the vApp to the on-premises site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcenter' in this case. |
|
|
Optional map of replication to rotated instance to recover to. If the map is omitted or doesn’t contain instance(s) for 1 (or more) existing VM-level replications, the latest available instances will be used. |
|
|
Optional parameter to specify whether the existing preceding rotated instances should be exposed as snapshots, whether the rotated instances should be consolidated or nothing should happen in the recovered VM.Can be [DO_NOTHING, EXPOSE_PITS, CONSOLIDATE]. Defaults to EXPOSE_PITS. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Specifies hw changes to be performed on the recovered VMs. Any of the hw changes are optional. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 141
{
"type" : "vcenter",
"powerOn" : false,
"snapshotOptions" : "CONSOLIDATE",
"instanceMap" : { },
"customVirtualHardwareMap" : { }
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcenter",
"powerOn" : false,
"snapshotOptions" : "CONSOLIDATE",
"instanceMap" : { },
"customVirtualHardwareMap" : { }
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5989
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failover",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Test a vApp Replication Failover to On-Premises
POST /vapp-replications/{replicationId}/failover
tests failover of all the child VM replications
in the vApp to the on-premises site.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcloud' in this case. |
|
|
Optional map of replication to rotated instances to recover to. If the map is omitted or doesn’t contain instance(s) for 1 (or more) existing VM-level replications, the latest available instances will be used. Cannot be used together with the 'sync' parameter set to true. |
|
|
Whether automatic synchronization should be performed before the failover test. Cannot be set to 'true' if the 'instanceMap' parameter is populated. |
|
|
Network settings for each VM. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Network settings for replication vApp result due to failover/migrate or test failover. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. |
|
|
When present, the source vApp network is isolated one. |
|
|
UUID of the source org vDC network. |
|
|
Name of the source org vDC network. |
|
|
When present, the destination vApp network is isolated one. |
|
|
UUID of the destination org vDC network. |
|
|
Name of the destination org vDC network. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 556
{
"type" : "vcloud",
"powerOn" : true,
"sync" : false,
"instanceMap" : { },
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : { }
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcloud",
"powerOn" : true,
"sync" : false,
"instanceMap" : { },
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : { }
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5989
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failover",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Delete the Test Failover vApp Replication
DELETE /vapp-replications/{replicationId}/failover-test
cleans up the test failover vApp.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
DELETE /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/failover-test?site=site2' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 6000
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "failoverTestCleanup",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Migrate a vApp Replication
POST /vapp-replications/{replicationId}/migrate
performs a planned migration for all the child VM replications in the vApp.
The planned migration attempts to synchronize the latest changes of the source VMs and then powers off the source VMs and vApp. The source site must be available for the planned migration to succeed. If the source site is unavailable, try performing a failover instead.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
Cloud vApp replication identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request fields
Path | Type | Description |
---|---|---|
|
|
Discriminator property, should be set to 'vcloud' in this case. |
|
|
Optional parameter to specify whether the rotated instances should be consolidated or nothing should happen in the recovered VM. Defaults to false. |
|
|
Network settings for each VM. |
|
|
Whether or not the recovered VM should be powered on. |
|
|
Network settings for replication vApp result due to failover/migrate or test failover. |
|
|
C2C - If vApp has networks connected to OrgVdcNetwork, the mapping specifies which is the corresponding destination OrgVdcNetwork to use (if any). |
|
|
Name of the vApp network at the source. |
|
|
When present, the source vApp network is isolated one. |
|
|
UUID of the source org vDC network. |
|
|
Name of the source org vDC network. |
|
|
When present, the destination vApp network is isolated one. |
|
|
UUID of the destination org vDC network. |
|
|
Name of the destination org vDC network. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - ID. |
|
|
OrgVdc Networks which the vApp to bridge to (if it hasn’t already) - name. |
|
|
C2C - copy source networks. |
|
|
Shortcut option to connect all VM NICs to single orgVdcNetwork. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/migrate?site=site2 HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 541
{
"type" : "vcloud",
"powerOn" : false,
"consolidate" : false,
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : { }
}
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/migrate?site=site2' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"type" : "vcloud",
"powerOn" : false,
"consolidate" : false,
"vAppNetworkSettings" : {
"networkMappings" : [ {
"sourceNetworkName" : "sourceNetworkName",
"sourceOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
},
"destinationOrgVdcNetwork" : {
"id" : "id",
"name" : "name"
}
} ],
"copySourceNetworks" : false,
"bridgeOrgVdcNetworks" : [ {
"id" : "id",
"name" : "name"
} ],
"bulkConnectVmNics" : true
},
"vmNetworkSettings" : { }
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5988
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "migrate",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Reverse a vApp Replication
POST /vapp-replications/{replicationId}/reverse
reverses all the child VM replications in the vApp.
By using a failover or a planned migration, the reversed replication needs to be recovered. A new vApp replication is created in the opposite direction. The disks of the original source VM are used as seeds. The original source VMs are removed. The original source vApp is powered off and left intact with no VMs.
Available since: v2
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
ID of the vApp replication to reverse. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
POST /vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/reverse?site=site2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Type: application/x-www-form-urlencoded
site=site2
Example request
$ curl 'https://localhost:8046/vapp-replications/C4VAPP-ec991bd5-af9d-446a-8599-5b693842c4a3/reverse?site=site2' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
vApp replication info. |
|
|
The Cloud vApp-level replication ID. |
|
|
The ID of the user that owns the replication. |
|
|
Replicated vApp details. |
|
|
Replicated VMware Cloud Director vApp name. |
|
|
Replicated VMware Cloud Director vApp description. |
|
|
VMware Cloud Director key/value metadata for the vApp. |
|
|
VMware Cloud Director vApp networks descriptions. |
|
|
A list of child VM-level replications. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this vapp replication. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The Cloud VM-level replication ID. |
|
|
VMware Cloud Director VM ID. |
|
|
VMware Cloud Director VM name. |
|
|
Destination storage profile. |
|
|
Destination storage profile display name. |
|
|
Provides vCenter Server coordinates for an ongoing destination replication to admin users. |
|
|
The vCenter Server instance. |
|
|
The instance UUID of the vCenter Server where the replica files are located. |
|
|
VMware Cloud Director datastore identifier for the datastore on which the replication resides. This datastore resides in the vCenter Server. Only visible to administrator users. |
|
|
The vCenter Server managed object ID of the datastore the replication resides on. Only visible for administrator users. |
|
|
The name of the datastore the replication resides on. This datastore exists within vCenter Server. Only visible for administrator users. |
|
|
Indicates whether the underlying VM replication is paused. |
|
|
VM-level replication settings. |
|
|
VMware Cloud Director startupInfo for the VM. |
|
|
VMware Cloud Director metadata for the VM. |
|
|
Source state information. |
|
|
Destination state information. |
|
|
Shows the replication traffic (data) connection health. Possible values: [SYNCING, INITIAL_SYNCING, OK, PAUSED, POWERED_OFF, PRUNING, FINISHED, UNKNOWN, ERROR]. |
|
|
Representation of the replication health suitable for UI purposes. |
|
|
The startTime of the latest task associated with this VM replication. |
|
|
Whether the replication is reversed. Note this flag gets inverted on each reverse, so only the odd reversed replication will show 'true'. |
|
|
VMware Cloud Director VM computer name. |
|
|
VMware Cloud Director VM description. |
|
|
True when the VM replication is a migration. False when the replication is a protection. |
|
|
The SLA profile applied to this replication. |
|
|
The ID of the SLA profile applied to this replication. |
|
|
The name of the SLA profile applied to this replication. |
|
|
Source vApp info. |
|
|
The shortname of the site that holds the source vApp. |
|
|
The shortname of the org the source vApp belongs to. |
|
|
The VMware Cloud Director virtual data center ID where the source vApp resides. |
|
|
The VMware Cloud Director virtual data center name where the source vApp resides. |
|
|
Source vApp VMware Cloud Director ID. |
|
|
Replication destination info. |
|
|
The shortname of the destination site. |
|
|
VMware Cloud Director virtual data center ID in the destination site. |
|
|
VMware Cloud Director virtual data center Name in the destination site. |
|
|
Destination organization in VMware Cloud Director. |
|
|
The VMware Cloud Director vApp on the destination site that holds the recovered VM (only populated if one or more VMs belonging to the same source vApp are recovered on the destination site). |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 5988
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "reverse",
"resourceType" : "vmReplication",
"resourceId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"resourceName" : "my vapp 1"
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "VappReplicationInfo",
"result" : {
"id" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"owner" : "org1@site1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"descriptor" : {
"name" : "my vapp 1",
"description" : "vapp description in vCD",
"metadata" : { },
"networks" : [ ]
},
"vmReplications" : [ {
"id" : "C4-11111111-af9d-446a-8599-5b693842c4a3",
"vmId" : "d1d9739f-9e3b-4c24-9cbb-3a9fdddaf47c",
"vmName" : "my vm 1",
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
}, {
"id" : "C4-22222222-af9d-446a-8599-5b693842c4a3",
"vmId" : "f7824b5e-9f82-4390-b6c9-977093c83a71",
"vmName" : "my vm 2",
"isPaused" : false,
"settings" : {
"description" : "Another vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 0,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 1,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : { },
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"storageProfile" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"storageProfileName" : "storageProfileName",
"vimLocation" : {
"vimServer" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"vimServerInstanceUuid" : "107102e0-e03b-404e-8e17-0688c657a74b",
"datastore" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"datastoreMoref" : "datastore-1",
"datastoreName" : "test datastore"
},
"computerName" : "computerName",
"vmDescription" : "vmDescription",
"isMigration" : false,
"slaProfile" : {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"displayName" : "Gold"
}
} ],
"lastUpdated" : 618094800000,
"isMigration" : false,
"overallHealth" : "GREEN"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Resource Usage
Resource Usage by Organization Virtual Datacenter
GET /org-vdcs/virtual-hardware-summary
returns the resources that all replicated VMs consume after failing over,
on a per-Organization Virtual Datacenter-level.
When this request is invoked with an administrative session, the information includes all replicated VMs.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Request structure
GET /org-vdcs/virtual-hardware-summary HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/org-vdcs/virtual-hardware-summary' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier for the Organization virtual data center. |
|
|
The name of the Organization virtual data center. |
|
|
The Organization to which the Organization virtual data center belongs to. |
|
|
The sum of all VM replications vCPUs. |
|
|
The sum of the memory of each VM being replicated. |
|
|
The sum of the capacity of each replicated disk of each VM being replicated. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 161
[ {
"id" : "2bfb7696-3aa1-49d3-bb40-d9e97df1baba",
"orgVdcName" : "vdc_s1Org",
"org" : "s1Org",
"cpus" : 4,
"memoryMB" : 1024,
"storageMB" : 5120
} ]
Resource Usage by Provider Virtual Datacenter
GET /provider-vdcs/virtual-hardware-summary
returns the resources that all replicated VMs consume after failing over,
on a per-Provider Virtual Datacenter-level.
Available since: v4
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Request structure
GET /provider-vdcs/virtual-hardware-summary HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/provider-vdcs/virtual-hardware-summary' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier for the Provider virtual data center. |
|
|
The name of the Provider virtual data center. |
|
|
The sum of all VM replications vCPUs. |
|
|
The sum of the memory of each VM being replicated. |
|
|
The sum of the capacity of each replicated disk of each VM being replicated. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 150
[ {
"id" : "107102e0-e03b-404e-8e17-0688c657a74b",
"providerVdcName" : "pvdc_s1",
"cpus" : 80,
"memoryMB" : 10240,
"storageMB" : 5000000
} ]
SLA Profiles
SLA Profiles simplify starting a new replication. Use the SLA profiles to enforce the same SLA attributes between bulk of protections or the provider can control the SLA attributes the tenant uses, and whether the tenant is allowed to customize the SLA attributes.
The default SLA profiles are:
-
Gold - 30 minutes RPO, 14 instances over the last 2 weeks, no quescing, no compression and immediate sync start time
-
Silver - 2 hours RPO, 7 instances over the last 1 week, no quescing, no compression and immediate sync start time
-
Bronze - 6 hours RPO, no retention policy, no quescing, no compression and immediate sync start time
Get the Details of All the SLA Profiles
GET /sla-profiles
returns the details of all SLA profiles.
Available since: v4
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
The local or remote site where the SLA profile is defined. When omitted, the local site is assumed. |
Request structure
GET /sla-profiles HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/sla-profiles' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
User-friendly label, which can be used in the UI/for debugging. |
|
|
Recovery Point Objective of the profile. |
|
|
Lightweight Delta Protocol traffic configuration of the profile. |
|
|
Whether to attempt to quiesce the Guest OS. |
|
|
The retention policy of the profile. A retention policy defines how instances should be retained. |
|
|
The set of rules building up the retention policy of the profile. |
|
|
The number of instances to store. |
|
|
Time (in min) between each two consequent stored instances. |
|
|
Replication initial sync time. The time is specified as hours and minutes of the day (converted to milliseconds) (UTC) when the desired sync must happen. If the initial sync time is 0, the sync will not be delayed. |
|
|
The number of organizations, which have this profile assigned. |
|
|
The number of replications created with this profile. |
|
|
UUID of the profile. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 308
[ {
"id" : "gold",
"displayName" : "Gold",
"rpo" : 30,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : false,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 14,
"distance" : 1440
} ]
},
"initialSyncTime" : 0,
"orgs" : -1,
"replications" : -1
} ]
Assign an SLA Profile to an Organization
POST /sla-profiles/orgs/{org}/profiles/{profileId}
assigns the specified SLA profile to the local VMware Cloud Director organization.
Available since: v4
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
UUID of the profile. |
|
The short name of the local VMware Cloud Director organization. |
Request structure
POST /sla-profiles/orgs/org1/profiles/d358c030-255b-43e8-89d7-e509cee48348 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/sla-profiles/orgs/org1/profiles/d358c030-255b-43e8-89d7-e509cee48348' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Example response
HTTP/1.1 201 Created
Unassign an SLA Profile from an Organization
DELETE /sla-profiles/orgs/{org}/profiles/{profileId}
unassigns the specified SLA profile from the specified organization.
Available since: v4
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
UUID of the profile. |
|
The short name of the local VMware Cloud Director organization. |
Request structure
DELETE /sla-profiles/orgs/org1/profiles/d358c030-255b-43e8-89d7-e509cee48348 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/sla-profiles/orgs/org1/profiles/d358c030-255b-43e8-89d7-e509cee48348' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Example response
HTTP/1.1 204 No Content
Tenant APIs
The following APIs can be used to manage and monitor tenants (a.k.a. orgs).
Get the Historical Traffic Statistics for a Tenant
GET /owner/{owner}/traffic
returns the historic replication traffic statistics, that is aggregated by tenant.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
The owner ID. |
Request parameters
Parameter | Description |
---|---|
|
The desired interval between the samples. Defaults to 'HOUR'. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
The timestamp (in msec) of the historical moment from which samples are retrieved. By default, 24 hours ago. |
|
The timestamp (in msec) of the moment up to which samples are retrieved. By default, 'now'. |
Request structure
GET /owner/s2Org@site2/traffic?interval=HOUR&start=1563451200000&end=1563458400000 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/owner/s2Org@site2/traffic?interval=HOUR&start=1563451200000&end=1563458400000' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The object for which historic data is collected. |
|
|
The interval between the samples. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
|
The timestamp (in msec) of the historical moment from which samples are retrieved. |
|
|
The timestamp (in msec) of the moment up to which samples are retrieved. |
|
|
The samples. |
|
|
The timestamp (in msec) of the moment when the sample is collected. |
|
|
The value of the sample at that moment. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 308
{
"label" : "s2Org@site2",
"interval" : "HOUR",
"start" : 1563451200000,
"end" : 1563458400000,
"samples" : [ {
"timestamp" : 1563451200000,
"bytes" : 27950.0
}, {
"timestamp" : 1563454800000,
"bytes" : 54023.0
}, {
"timestamp" : 1563458400000,
"bytes" : 52236.0
} ]
}
Get the Historical Disk Usage Statistics for a Tenant
GET /owner/{owner}/disk-usage
returns the historic replication disk usage statistics, that is aggregated by tenant.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
The owner ID. |
Request parameters
Parameter | Description |
---|---|
|
The desired interval between the samples. Defaults to 'HOUR'. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
The timestamp (in msec) of the historical moment from which samples are retrieved. By default, 24 hours ago. |
|
The timestamp (in msec) of the moment up to which samples are retrieved. By default, 'now'. |
Request structure
GET /owner/s2Org@site2/disk-usage?interval=HOUR&start=1563451200000&end=1563458400000 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/owner/s2Org@site2/disk-usage?interval=HOUR&start=1563451200000&end=1563458400000' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The object for which historic data is collected. |
|
|
The interval between the samples. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
|
The timestamp (in msec) of the historical moment from which samples are retrieved. |
|
|
The timestamp (in msec) of the moment up to which samples are retrieved. |
|
|
The samples. |
|
|
The timestamp (in msec) of the moment when the sample is collected. |
|
|
The value of the sample at that moment. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 308
{
"label" : "s2Org@site2",
"interval" : "HOUR",
"start" : 1563451200000,
"end" : 1563458400000,
"samples" : [ {
"timestamp" : 1563451200000,
"bytes" : 27950.0
}, {
"timestamp" : 1563454800000,
"bytes" : 54023.0
}, {
"timestamp" : 1563458400000,
"bytes" : 52236.0
} ]
}
Get the Historical Disk Usage Statistics for a Storage Profile
The following procedure contains calls to non-public APIs. There is no backward compatibility guarantees whatsoever for non-public APIs. |
Perform a GET /inventory/vdcs
request in order to retrieve a list of Virtual Datacenters.
Available since: v4
Required roles: One of EVERYONE, PEER_IMPERSONATING
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
|
An optional list of comma-separated fields, used to sort the result.The default sorting direction is ascending. When a field finishes with a hyphen, the direction for this field will be descending. This allows chaining e.g. col,col2-,col3 will result in sorting by col (asc), then by col2 (desc) and finally by col3 (asc). Supported fields: [orgName, name, status]. If this field is omitted, the result is sorted by name in ascending order. |
|
When present, all vDCs, whose name contain the given value, will be returned. |
|
When present, all vDCs, allocated to the given organization ID, will be returned. Required for providers, ignored for Organization Admins. |
|
When present, the vDCs are filtered by their 'enabled' flag. |
Example request
$ curl 'https://localhost:8046/inventory/vdcs' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The total number of items in the database of the Cloud Service. |
|
|
Number of items skipped before retrieving the items. |
|
|
The maximum number of items that this query retrieves. |
|
|
Virtual data centers on the respective VMware Cloud Director instance. |
|
|
Virtual data center ID in VMware Cloud Director. |
|
|
Virtual data center name. |
|
|
Organization name. |
|
|
CPU used in Mhz. |
|
|
CPU limit in Mhz. |
|
|
CPU allocation in Mhz. |
|
|
Memory used in MB. |
|
|
Memory limit in MB. |
|
|
Memory allocation in MB. |
|
|
Storage used in MB. |
|
|
Storage limit in MB. |
|
|
The number of VMs in the virtual data center. |
|
|
The configured maximum number of VMs in the virtual data center. |
|
|
Virtual data center status as reported by VMware Cloud Director. |
|
|
Defines whether the organization virtual data center is enabled. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 890
{
"items" : [ {
"id" : "f61d60d2-698a-46dc-a266-88df27644956",
"name" : "Virtual DC 1",
"status" : "READY",
"orgName" : "org1",
"cpuUsedMhz" : 2000,
"cpuLimitMhz" : 0,
"cpuAllocationMhz" : 0,
"memoryUsedMB" : 200,
"memoryLimitMB" : 0,
"memoryAllocationMB" : 0,
"storageUsedMB" : 16800,
"storageLimitMB" : 0,
"numberOfVMs" : 5,
"vmQuota" : 100,
"enabled" : true
}, {
"id" : "9664de13-6150-4315-9f59-2d85eb4c302f",
"name" : "Virtual DC 2",
"status" : "READY",
"orgName" : "org2",
"cpuUsedMhz" : 2000,
"cpuLimitMhz" : 0,
"cpuAllocationMhz" : 0,
"memoryUsedMB" : 200,
"memoryLimitMB" : 0,
"memoryAllocationMB" : 0,
"storageUsedMB" : 16800,
"storageLimitMB" : 0,
"numberOfVMs" : 5,
"vmQuota" : 100,
"enabled" : false
} ],
"total" : 2,
"offset" : 0,
"limit" : 25
}
For the desired Virtual Datacenter, using its id from the response of the call above,
perform a GET /inventory/vdcs/{vdcId}/storage-profiles
in order to retrieve a list of available storage profiles.
Available since: v3.5
Required roles: One of EVERYONE, PEER_IMPERSONATING
Path parameters
Parameter | Description |
---|---|
|
VMware Cloud Director data center identifier. |
Request parameters
Parameter | Description |
---|---|
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Example request
$ curl 'https://localhost:8046/inventory/vdcs/5ee9224f-305d-46f6-865f-b605e70acef8/storage-profiles' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
Storage profiles in the given virtual data center. |
|
|
Storage profile ID in VMware Cloud Director. |
|
|
Storage profile name. |
|
|
Storage used in MB. |
|
|
Storage limit in MB. |
|
|
Defines whether the storage profile is enabled in VMware Cloud Director. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 257
[ {
"id" : "107102e0-e03b-404e-8e17-0688c657a74b",
"name" : "*",
"usedMB" : 0,
"limitMB" : 0,
"enabled" : true
}, {
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"name" : "gold profile",
"usedMB" : 0,
"limitMB" : 0,
"enabled" : true
} ]
Using the ID for the desired storage profile, perform a
GET /vm-replications?storageProfile=<storage=profile-id-goes-here>
to retrieve a list of VM replications with the given storage profile.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Request parameters
Parameter | Description |
---|---|
|
When present, returned replications are filtered by replication owner. Filtering option available only to admins. |
|
When present, returned replications will be source site short name. Local site filtering is not supported. |
|
When present, returned replications are filtered by source site type (e.g. vcloud/vcenter). |
|
When present, returned replications are filtered by source vDC ID. |
|
When present, returned replications are filtered by source vDC name. |
|
When present, returned replications are filtered by VMware Cloud Director source org. |
|
When present, the administrators can filter by source vCenter Server instance ID. |
|
When present, returned replications are filtered by source source VM ID. |
|
When present, returned replications are filtered by Virtual Machine name. The VM name must contain the provided value. |
|
When present, returned replications will storage profile. |
|
When present, returned replications are filtered by destination org. |
|
When present, returned replications are filtered by destination vDC ID. |
|
When present, returned replications are filtered by destination vDC name. |
|
When present, returned replications are filtered by destination site type (e.g. vcloud/vcenter). |
|
When present, returned replications are filtered by destination recovered vAppId. |
|
When present, admins can filter by vCenter instance ID. |
|
When present, admins can filter by datastore moid. vimServerInstanceUuid is required. |
|
When present, returned replications are filtered by replication type: migration or protection. |
|
When present, the SLA Profile to use instead of the custom rpo/dataConnectionType/retentionPolicy settings. |
|
When present, the displayName of the SLA Profile used by a replication. |
|
When present, less-than filtering will be applied. |
|
When present, greater-than filtering will be applied. |
|
When present, returned replications are filtered by their overall health. |
|
When present, returned replications are filtered by their data connection state. |
|
When present, returned replications are filtered by source VMware Cloud Director org shortname. Comma-separated Cloud replication ids are expected. |
|
An optional list of comma-separated fields, used to sort the result.The default sorting direction is ascending. When a field finishes with a hyphen, the direction for this field will be descending. This allows chaining e.g. col,col2-,col3 will result in sorting by col (asc), then by col2 (desc) and finally by col3 (asc). Supported fields: [vmName, sourceSite, sourceOrg, sourceVdcName, site, destinationOrg, destinationVdcName, owner, lastUpdated]. If this field is omitted, the result is sorted by start time in descending order. |
|
Number of items skipped before retrieving the items. By default, 0 if skipped. |
|
Query limit - maximum number of items this query should retrieve. When omitted or higher than the server’s limits, defaults to 100. |
|
Optional site to run the operation on. When omitted, defaults to the local site. |
Request structure
GET /vm-replications?storageProfile=52ce9bc4-2563-448d-b8af-9047a03ce5c2 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/vm-replications?storageProfile=52ce9bc4-2563-448d-b8af-9047a03ce5c2' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The total number of items in the database of the Cloud Service. |
|
|
Number of items skipped before retrieving the items. |
|
|
The maximum number of items that this query retrieves. |
|
|
A list of VM-level replications. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 2771
{
"items" : [ {
"id" : "C4-ec991bd5-af9d-446a-8599-5b693842c4a3",
"owner" : "org1@site1",
"vmId" : "4e7fa4b1-e8d9-45bd-a91d-852c46b7a0da",
"vmName" : "my vm 1",
"source" : {
"site" : "site1",
"org" : "org1",
"vdcId" : "f61d60d2-698a-46dc-a266-88df27644956",
"vdcName" : "Virtual DC 1",
"vappId" : "d6977f40-4d90-46b2-a34e-5077e8648eda",
"vappName" : "my vApp"
},
"destination" : {
"site" : "site2",
"org" : "s2org",
"vdcId" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"vdcName" : "Virtual DC 2",
"recoveredVappId" : "vapp-1"
},
"storageProfile" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"storageProfileName" : "gold profile",
"vimLocation" : {
"vimServer" : "c3ebbf62-c7ff-4c70-b783-7b6074d770e4",
"vimServerInstanceUuid" : "318d06a5-b126-4a8d-8150-dc90d3e385cd",
"datastore" : "69f9e569-30f1-46a7-a754-969a2fa5b955",
"datastoreMoref" : "datastore-12",
"datastoreName" : "testDatastore"
},
"isPaused" : false,
"settings" : {
"description" : "A vm replication",
"rpo" : 5,
"dataConnectionType" : "ENCRYPTED_COMPRESSED",
"quiesced" : true,
"retentionPolicy" : {
"rules" : [ {
"numberOfInstances" : 3,
"distance" : 60
} ]
},
"initialSyncTime" : 4102444800,
"excludedDiskKeys" : [ ]
},
"startupInfo" : {
"order" : 0,
"startAction" : "powerOn",
"startDelay" : 0,
"stopAction" : "powerOff",
"stopDelay" : 0
},
"metadata" : {
"val1" : {
"key" : "val1",
"access" : "READONLY",
"type" : "STRING",
"value" : "Hello, world!"
}
},
"sourceState" : {
"state" : "syncing",
"progress" : {
"progress" : 50,
"bytesTransferred" : 2048,
"bytesToTransfer" : 4096,
"checksumTotalBytes" : 4096,
"checksumComparedBytes" : 4096
},
"stateAge" : 0
},
"destinationState" : {
"currentRpoViolation" : -1,
"latestInstance" : null,
"state" : "fullsync",
"recoveryInfo" : {
"vAppId" : null,
"vcdVmId" : null,
"type" : "vcd",
"recoveryState" : "NOT_STARTED"
},
"lastError" : null,
"stateAge" : 0,
"spaceRequirement" : 0,
"isMovingReplica" : false
},
"dataConnectionState" : "OK",
"overallHealth" : "GREEN",
"lastUpdated" : 618094800000,
"isReversed" : false,
"vappReplicationId" : "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
"computerName" : null,
"vmDescription" : null,
"isMigration" : false,
"slaProfile" : null
} ],
"total" : 1,
"offset" : 0,
"limit" : 100
}
Perform a GET /vm-replications/{replicationId}/disk-usage
for each of the returned
VM replication IDs to retrieve replication disk usage statistics for the given VM replication.
Available since: v4
Required roles: One of EVERYONE, PEER_MONITORING
Path parameters
Parameter | Description |
---|---|
|
The VM replication ID. |
Request parameters
Parameter | Description |
---|---|
|
The desired interval between the samples. Defaults to 'HOUR'. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
The timestamp (in msec) of the historical moment from which samples are retrieved. By default, 24 hours ago. |
|
The timestamp (in msec) of the moment up to which samples are retrieved. By default, 'now'. |
Example request
$ curl 'https://localhost:8046/vm-replications/C4-09b2917c-bbe9-4693-ae3f-95b43a94b244/disk-usage?interval=HOUR&start=1563451200000&end=1563458400000' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The object for which historic data is collected. |
|
|
The interval between the samples. One of: [FIVE_MINUTES, HOUR, DAY]. |
|
|
The timestamp (in msec) of the historical moment from which samples are retrieved. |
|
|
The timestamp (in msec) of the moment up to which samples are retrieved. |
|
|
The samples. |
|
|
The timestamp (in msec) of the moment when the sample is collected. |
|
|
The value of the sample at that moment. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 336
{
"label" : "C4-09b2917c-bbe9-4693-ae3f-95b43a94b244",
"interval" : "HOUR",
"start" : 1563451200000,
"end" : 1563458400000,
"samples" : [ {
"timestamp" : 1563451200000,
"bytes" : 27950.0
}, {
"timestamp" : 1563454800000,
"bytes" : 54023.0
}, {
"timestamp" : 1563458400000,
"bytes" : 52236.0
} ]
}
Backup and Restore
Use the following APIs to generate a file-based backup of all the services in a cloud site.
The backup of a single service is stored as an encrypted *.tar.bz2.enc file.
The backup of the entire stack is stored as a *.tar.bz2 file that contains encrypted *.tar.bz2.enc files for each of the services on the Cloud site.
Generate a Backup
POST /backups
generates a new backup of all the services in a Cloud site.
Prerequisite to generate a backup is for all services in the Cloud site to be paired and in a healthy state. |
Available since: v4.1
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Request fields
Path | Type | Description |
---|---|---|
|
|
The password must contain at least one upper case letter, at least one lower case letter, at least one digit, and at least one special character. The minimum length is 8 characters. |
Request structure
POST /backups HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 30
{
"password" : "Pa$$w0rD!"
}
Example request
$ curl 'https://localhost:8046/backups' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"password" : "Pa$$w0rD!"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The ID of the generated backup. |
|
|
The timestamp of the moment the backup was generated. |
|
|
A SHA-512 checksum of the backup payload. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 612
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "generate",
"resourceType" : "backup",
"resourceId" : "99869963-bd82-43c4-a5cd-eef31b058851",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "BackupInfo",
"result" : {
"id" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"generatedOn" : 1499929548951,
"hash" : "SHA-512:2C:...:ED:A0"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
Generate a Backup with an ID
POST /backups/{backupId}
generates a new backup with the specified ID of all the services in a Cloud site.
Prerequisite to generate a backup is for all services in the Cloud site to be paired and in a healthy state. |
Available since: v4.1
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
User-provided ID to use when generating the backup. |
Request fields
Path | Type | Description |
---|---|---|
|
|
The password must contain at least one upper case letter, at least one lower case letter, at least one digit, and at least one special character. The minimum length is 8 characters. |
Request structure
POST /backups/2bfb7696-3aa1-49d3-bb40-d9e97df1baba HTTP/1.1
Content-Type: application/json
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Content-Length: 30
{
"password" : "Pa$$w0rD!"
}
Example request
$ curl 'https://localhost:8046/backups/2bfb7696-3aa1-49d3-bb40-d9e97df1baba' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=' \
-d '{
"password" : "Pa$$w0rD!"
}'
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
The ID of the generated backup. |
|
|
The timestamp of the moment the backup was generated. |
|
|
A SHA-512 checksum of the backup payload. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 612
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "generate",
"resourceType" : "backup",
"resourceId" : "99869963-bd82-43c4-a5cd-eef31b058851",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : "BackupInfo",
"result" : {
"id" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"generatedOn" : 1499929548951,
"hash" : "SHA-512:2C:...:ED:A0"
},
"error" : null,
"warnings" : [ ],
"site" : "site2"
}
List the Available Backups to Download
GET /backups
lists all backups that are available to download.
Available since: v4.1
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Request structure
GET /backups HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/backups' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The ID of the backup. |
|
|
The timestamp of the moment the backup was generated. |
|
|
A SHA-512 checksum of the backup payload. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 123
[ {
"id" : "5ee9224f-305d-46f6-865f-b605e70acef8",
"generatedOn" : 1499929548951,
"hash" : "SHA-512:2C:...:ED:A0"
} ]
Download a Backup
GET /backups/{backupId}
downloads the specified backup.
Available since: v4.1
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
The ID of the backup to download. |
Request structure
GET /backups/5ee9224f-305d-46f6-865f-b605e70acef8 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/backups/5ee9224f-305d-46f6-865f-b605e70acef8' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
To save the backup file in the current folder, pass the -J and -O arguments to curl. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+x-gtar;charset=UTF-8
Content-Disposition: inline; filename="cloud-backup-4.1.0.1660207-site1-20170713-070548UTCnull"
Accept-Ranges: bytes
Content-Length: 39
<<backup contents, a .tar.bz2 archive>>
Generate a Single-Use Cookie for downloading a backup
POST /backups/cookie/{backupId}
generates a one-time cookie that can be used to download a backup.
The cookie can be used to download the specified backup, without requiring a valid API key.
Available since: v4.1
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
User-provided ID to use when generating the backup. |
Request structure
POST /backups/cookie/5ee9224f-305d-46f6-865f-b605e70acef8 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/backups/cookie/5ee9224f-305d-46f6-865f-b605e70acef8' -i -X POST \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
The generated cookie. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 47
{
"cookie" : "lBvDMttZLLnWVZwC+85ufqiNt4M="
}
Download a Backup with a Single-Use Cookie
GET /backups/cookie/{backupId}
downloads the specified backup, without requiring a valid API key.
Available since: v4.1
Required roles: (authentication not required)
Path parameters
Parameter | Description |
---|---|
|
The ID of the backup to download. |
Request structure
GET /backups/cookie/5ee9224f-305d-46f6-865f-b605e70acef8?cookie=lBvDMttZLLnWVZwC+85ufqiNt4M%3D&cookie=lBvDMttZLLnWVZwC%2B85ufqiNt4M%3D HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/backups/cookie/5ee9224f-305d-46f6-865f-b605e70acef8?cookie=lBvDMttZLLnWVZwC+85ufqiNt4M%3D&cookie=lBvDMttZLLnWVZwC%2B85ufqiNt4M%3D' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
To save the backup file in the current folder, pass the -J and -O arguments to curl. |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.vmware.h4-v4.1+x-gtar;charset=UTF-8
Content-Disposition: inline; filename="cloud-backup-4.1.0.1660207-site1-20170713-070548UTCnull"
Accept-Ranges: bytes
Content-Length: 39
<<backup contents, a .tar.bz2 archive>>
Delete a backup
DELETE /backups/{backupId}
deletes the specified backup and reclaims the disk space that the backup occupies.
Available since: v2
Required roles: One of ADMINISTRATORS, VRADMINISTRATORS
Path parameters
Parameter | Description |
---|---|
|
The ID of the backup which is to be deleted. |
Request structure
DELETE /backups/5ee9224f-305d-46f6-865f-b605e70acef8 HTTP/1.1
Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8046
Example request
$ curl 'https://localhost:8046/backups/5ee9224f-305d-46f6-865f-b605e70acef8' -i -X DELETE \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='
Response structure
Path | Type | Description |
---|---|---|
|
|
A unique identifier of the long-running task, that can be used for monitoring. |
|
|
The user who started the task. |
|
|
The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]. |
|
|
Workflow information about the task. |
|
|
The workflow type. |
|
|
Type of the resource associated with the task. |
|
|
Identifier of the resource associated with the task. Not all tasks have resourceId. |
|
|
Name of the resource associated with the task. Not all resources have a name. |
|
|
Percentage-based progress of the task. |
|
|
Timestamp (in msec) of the last task status update. |
|
|
Timestamp (in msec) of the time the task is created. |
|
|
Timestamp in (msec) of the time the task completed. A value of -1 indicates that the task is not yet complete. |
|
|
Indicates the type of the result for tasks that completed with a result. |
|
|
Warnings, which occurred during the task execution. |
|
|
Error field that is populated if the task execution fails. |
|
|
None. |
|
|
The site name where the task runs. |
Example response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.vmware.h4-v4.1+json;charset=UTF-8
Content-Length: 479
{
"id" : "52ce9bc4-2563-448d-b8af-9047a03ce5c2",
"user" : "org2@site2",
"workflowInfo" : {
"type" : "remove",
"resourceType" : "backup",
"resourceId" : "99869963-bd82-43c4-a5cd-eef31b058851",
"resourceName" : null
},
"progress" : 100,
"state" : "SUCCEEDED",
"lastUpdated" : 1499929558827,
"startTime" : 1499929548951,
"endTime" : 1499929558827,
"resultType" : null,
"result" : null,
"error" : null,
"warnings" : [ ],
"site" : "site2"
}