Virtual Disk Manager Shrink Virtual Disk Task
Deprecated as of vSphere 6.5, use ShrinkDisk_Task instead.
Shrink a sparse virtual disk.
The datacenter parameter may be omitted if a URL is used to name the disk.
The optional parameter copy
specifies whether to shrink the disk in copy-shrink mode or in-place mode. In copy-shrink mode, additional space is required, but will result in a shrunk disk that is also defragmented. In-place shrink does not require additional space, but will increase fragmentation. The default behavior is to perform copy-shrink if the parameter is not specified.
Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.
Required privileges: System.View
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case VirtualDiskManager/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"name": "string",
"datacenter": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"copy": false
}
The name of the disk, either a datastore path or a URL referring to the virtual disk that should be shrink.
If true or omitted, performs shrink in copy-shrink mode, otherwise shrink in in-place mode.
This method returns a Task object with which to monitor the operation.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
FileFault: if an error occurs shrinking the virtual disk.
InvalidDatastore: if the operation cannot be performed on the datastore.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}