Remove Hard Disk operation
The Remove Hard Disk operation removes the specified hard disk from a virtual machine.
The following table describes the elements for this request.
Adapter request elements for the Remove Hard Disk operation
Element | Definition | Required | |
---|---|---|---|
<operation-type> | Defines the type of the operation: Configure_Vm | Yes | |
<operation-name> | Defines the name of operation: Remove_Hard_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 element required to execute the operation | Yes | |
<virtual-machine> | Contains the name of the virtual machine from which the specified hard disk is to be removed | Yes | |
<device-change-list> | Specifies the set of virtual disks to be removed by the configuration operation
| Yes |
The following code sample shows a sample adapter request for the Remove Hard Disk operation.
Sample adapter request for the Remove Hard Disk operation
<operation-type>Configure_Vm</operation-type>
<operation-name>Remove_Hard_Disk</operation-name>
<soap-url></soap-url>
<transport></transport>
<user-name></user-name>
<password></password>
<parameters>
<virtual-machine>TestDev</virtual-machine>
<spec>
<device-change-list>
<device-change>
<device type="VirtualDisk">
<disk-name>Hard Disk 1</disk-name>
<disk-key>2005</disk-key>
</device>
</device-change>
</device-change-list>
</spec>
</parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Remove Hard Disk operation.
Sample adapter response for the Remove Hard Disk operation
<metadata>
<status>success</status>
</metadata>
<RemoveHardDiskResponse>
<Task>task-726</Task>
</RemoveHardDiskResponse>
</vmware-infrastructure-response>
The following table describes the response element.
Adapter response element for the Remove Hard Disk operation
Element | Definition |
---|---|
<Task> | Specifies the task ID of the submitted task |