Host V Storage Object Manager Host Create Disk Task
Create a virtual disk, which is a storage object with disk as consumption type.
Requires Datastore.FileManagement privilege on the datastore where the virtual disk object is created.
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 HostVStorageObjectManager/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"spec": {
"_typeName": "string",
"name": "string",
"keepAfterDeleteVm": false,
"backingSpec": {
"_typeName": "string",
"datastore": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"path": "string"
},
"capacityInMB": 0,
"profile": [
{
"_typeName": "string"
}
],
"crypto": {
"_typeName": "string"
},
"metadata": [
{
"_typeName": "string",
"key": "string",
"value": "string"
}
]
}
}
This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the newly created VStorageObject upon success.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
FileFault: If an error occurs when creating 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"
}
]
}