VMware Cloud Director API - POST-RelocateVm-vApp
POST /vApp/{id}/action/relocate
- Operation:
 - POST /vApp/{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/vApp/vm-96ea91f0-fca9-48aa-8b82-4c98fec1c941/action/relocate
Headers:
Content-Length: 329
Content-Type: application/vnd.vmware.vcloud.relocateVmParams+xml; charset=ISO-8859-1
x-vcloud-authorization: X600Twh81GezzqBm3B3GXTe8r9U8+U5kIrA3X4H2ctE=
Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:RelocateParams
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
<vcloud:Datastore
href="https://vcloud.example.com/api/admin/extension/datastore/80c399eb-07e2-4b99-a9e4-6bc0ac693345"
name="datastore1"
type="application/vnd.vmware.admin.datastore+xml"/>
</vcloud:RelocateParams>
 - Response
 - 
            HTTP/1.1 202 Accepted
Headers:
Content-Length: 1317
Content-Type: application/vnd.vmware.vcloud.task+xml;version=5.1
Location: https://vcloud.example.com/api/task/1b274765-9cec-4788-a7dd-292190d98daf
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><Task
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
cancelRequested="false"
expiryTime="2013-05-13T16:54:00.648+03:00"
href="https://vcloud.example.com/api/task/1b274765-9cec-4788-a7dd-292190d98daf"
id="urn:vcloud:task:1b274765-9cec-4788-a7dd-292190d98daf"
name="task"
operation="Relocating Virtual Machine (96ea91f0-fca9-48aa-8b82-4c98fec1c941)"
operationName="vappRelocateVm"
serviceNamespace="com.vmware.vcloud"
startTime="2013-02-12T16:54:00.648+02:00"
status="running"
type="application/vnd.vmware.vcloud.task+xml"
xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
<Link
href="https://vcloud.example.com/api/task/1b274765-9cec-4788-a7dd-292190d98daf/action/cancel"
rel="task:cancel"/>
<Owner
href="https://vcloud.example.com/api/vApp/vm-96ea91f0-fca9-48aa-8b82-4c98fec1c941"
name=""
type="application/vnd.vmware.vcloud.vm+xml"/>
<User
href="https://vcloud.example.com/api/admin/user/1260efee-6915-494c-8afa-84e7e6d8a310"
name="vcloud"
type="application/vnd.vmware.admin.user+xml"/>
<Organization
href="https://vcloud.example.com/api/org/a93c9db9-7471-3192-8d09-a8f7eeda85f9"
name="System"
type="application/vnd.vmware.vcloud.org+xml"/>
<Details/>
</Task>