Move Virtual Disk operation
The Move Virtual Disk operation relocates the virtual disks of a virtual machine to a specific location. If the {{<status>}} response element contains _success_, the {{<Task>}} response element contains the ID of the queued task, which you can use to obtain the task status.
The following table describes the elements for this request.
Adapter request elements for the Move Virtual Disk operation
Element | Definition | Required | |
|---|---|---|---|
<operation-type> | Defines the type of operation: Advanced_Vm | Yes | |
<operation-name> | Defines the name of operation: Move_Virtual_Disk | Yes | |
<soap-url> | Specifies the URL for the remote SOAP service running on the VMware VirtualCenter | No | |
<transport> | Specifies the transport protocol for the message | No | |
<user-name> | Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center | No | |
<password> | Specifies the password corresponding to <user-name> | Conditional; required if <user-name> is specified | |
<parameters> | Contains the elements required to execute the operation | Yes | |
<virtual-machine> | Contains the name of the virtual machine on which this operation is to be executed | Yes | |
<disk-list> | Contains the <datastore> and <disk-name> elements that specify the datastore location for each virtual disk
| ||
<datastore> | Specifies the target datastore to which the virtual disk specified in the corresponding <disk-name> element is to be moved | ||
<disk-name> | Specifies the name of the virtual disk to be moved | Yes | |
<datacenter> | Specifies the datacenter hosting the datastore | Conditional; required if the datastore with the same name exists across Datacenters | |
<transform> | Specifies the transformation that is to be performed on the disks | No |
The following code sample shows a sample adapter request for the Move Virtual Disk operation.
Sample adapter request for the Move Virtual Disk operation
<operation-type>Advanced_Vm</operation-type>
<operation-name>Move_Virtual_Disk</operation-name>
<user-name></user-name>
<password></password>
<soap-url></soap-url>
<transport></transport>
<parameters>
<virtual-machine>win1</virtual-machine>
<spec>
<disk-list>
<disk>
<!--Moves Disk1 to storage1-->
<disk-name>Disk1</disk-name>
<datastore>storage1</datastore>
</disk>
<disk>
<!--Moves Disk2 to storage2-->
<disk-name>Disk2</disk-name>
<datastore>storage2</datastore>
</disk>
</disk-list>
<transform>flat</transform>
</spec>
</parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Move Virtual Disk operation.
Sample adapter response for the Move Virtual Disk operation
<metadata>
<status>success</status>
</metadata>
<MoveVirtualDiskResponse>
<Task>task-1403</Task>
</MoveVirtualDiskResponse>
</vmware-infrastructure-response>
The following table describes the response element.
Adapter response element for the Move Virtual Disk operation
Element | Definition |
|---|---|
<Task> | Specifies the task ID of the submitted task |