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.

Warning

Note

This operation is not supported for virtual machines that carry snapshots.

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

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Warning

If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If the <transport> element is not provided, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Warning

If the value of the <transport> element is https-rpc, you must install the security certificate for the VMware Virtual Center to the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center

If no user name is specified, the request is executed with the user name that is specified in the configuration.

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

Example:

<disk-list>
<disk>
<datastore></datastore>
<disk-name></disk-name>
<disk>
<disk>
<datastore></datastore>
<disk-name></disk-name>
</disk>
</disk-list>


<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

If it is not valid for the current operation, the backend ignores this element. This can be used by clients, for example, to create sparse disks for templates.

Valid values: flat, sparse

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

<vmware-infrastructure-request>
    <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

<vmware-infrastructure-response>
<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

Use the task ID to obtain the status of the specified task.

For information about using the task ID to check the task status, see Request and response for the Retrieve_Task_Status operation.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 21.02