Vcenter V Storage Object Manager 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 VcenterVStorageObjectManager/{moId}.
The vSphere release schema. The current specification covers vSphere 9.1.0.0 APIs.
Show optional properties
{
"spec": {}
}
{
"spec": {
"_typeName": "string",
"id": {
"_typeName": "string",
"id": "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"
}
]
}
}
The specification of the virtual storage object to be created.
This method returns a Task object with which to monitor 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": {
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
},
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"spec":"{}"}' https://{api_host}/sdk/vim25/{release}/VcenterVStorageObjectManager/{moId}/CreateDisk_Task