VMware Cloud Director API - POST-RelocateVm-vAppTemplate

VMware Cloud Director API - POST-RelocateVm-vAppTemplate

POST /vAppTemplate/{id}/action/relocate

Operation:
POST /vAppTemplate/{id}/action/relocate
Description:
Relocate a VM to a different datastore.
Since:
1.5
Deprecated:
5.1
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.relocateVmParams+xml
application/vnd.vmware.vcloud.relocateVmParams+json
Input type:
RelocateParamsType
Output parameters
TaskType

This operation is asynchronous and return a task. When the task completes, the VM has been relocated.

Produce media type(s):
application/vnd.vmware.vcloud.task+xml
application/vnd.vmware.vcloud.task+json
Output type:
TaskType
Examples
Request
HTTP 1.1
POST /api/vAppTemplate/vm-2c02ee20-8ec8-42c2-b010-1aa2f9041827/action/relocate

Headers:
x-vcloud-authorization: tkgjgQtIS3veOl7Yf6fKBo9uty0vBe2f64jrT4Ogaz4=

Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns6:RelocateParams
    xmlns="http://www.vmware.com/vcloud/versions" xmlns:ns2="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ns3="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ns4="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ns5="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:ns6="http://www.vmware.com/vcloud/v1.5" xmlns:ns7="http://www.vmware.com/schema/ovf" xmlns:ns8="http://schemas.dmtf.org/ovf/environment/1" xmlns:ns9="http://www.vmware.com/vcloud/extension/v1.5">
    <ns6:Datastore
        type="application/vnd.vmware.admin.datastore+xml"
        name="datastore1"
        id="urn:vcloud:datastore:1d8a8c09-3c87-450f-8ba2-bff4d10a3b8a"
        href="https://vcloud.example.com/api/admin/extension/datastore/1d8a8c09-3c87-450f-8ba2-bff4d10a3b8a"/>
</ns6:RelocateParams>
Response
HTTP/1.1 202 Accepted

Headers:
Content-Length: 1303
Content-Type: application/vnd.vmware.vcloud.task+xml; version=5.5
Location: https://vcloud.example.com/api/task/631dc330-9426-49f7-a1d5-433f9d974ebc
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?>
<Task
    xmlns="http://www.vmware.com/vcloud/v1.5"
    status="running"
    startTime="2013-03-21T16:49:47.565+02:00"
    serviceNamespace="com.vmware.vcloud"
    operationName="vappRelocateVm"
    operation="Relocating Virtual Machine debian(2c02ee20-8ec8-42c2-b010-1aa2f9041827)"
    expiryTime="2013-06-19T16:49:47.565+03:00"
    cancelRequested="false"
    name="task"
    id="urn:vcloud:task:631dc330-9426-49f7-a1d5-433f9d974ebc"
    type="application/vnd.vmware.vcloud.task+xml"
    href="https://vcloud.example.com/api/task/631dc330-9426-49f7-a1d5-433f9d974ebc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloud.example.com/api/v1.5/schema/master.xsd">
    <Link
        rel="task:cancel"
        href="https://vcloud.example.com/api/task/631dc330-9426-49f7-a1d5-433f9d974ebc/action/cancel"/>
    <Owner
        type="application/vnd.vmware.vcloud.vm+xml"
        name="debian"
        href="https://vcloud.example.com/api/vApp/vm-2c02ee20-8ec8-42c2-b010-1aa2f9041827"/>
    <User
        type="application/vnd.vmware.admin.user+xml"
        name="admin"
        href="https://vcloud.example.com/api/admin/user/4b36181e-b32d-456e-ad94-8e0a568b1346"/>
    <Organization
        type="application/vnd.vmware.vcloud.org+xml"
        name="System"
        href="https://vcloud.example.com/api/org/a93c9db9-7471-3192-8d09-a8f7eeda85f9"/>
    <Details/>
</Task>