Cns Volume Manager Cns Create Volume
Creates container volume with given specifications.
Following privileges will be required on specified entities, to perform this operation. For dynamic provisioning, the datastores that does not have the necessary privileges will be ignored and other datastores that have the necessary privileges will be considered for volume placement.
- Datastore.FileManagement on datastores specified in input, required for block volume only
- Host.Config.Storage on vSAN file service enabled vSAN cluster, required for file volume only
- StorageProfile.View on RootFolder to access storage policy specified in input
Faults that can be set in individual result entry, corresponding to each VolumeCreateSpec instance in input:
- vmodl.fault.InvalidArgument set in case of invalid input arguments, invalid formats, invalid combination of inputs.
- vim.fault.NotFound set in case the existing disk that should be used to back the container volume cannot be found.
- vim.fault.CnsFault set in case of any other failure scenario.
- vim.fault.CnsAlreadyRegisteredFault set in case where the backing disk (either specified with URL path for VMDK volume or disk id for FCD volume) is already registered as CNS volume.
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 CnsVolumeManager/{moId}
.
The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.
"CnsCreateVolumeRequestType Object"
Specifications for volumes to be created.
Task to track the progress and overall state of this operation.
"MoRefTask Object"
InvalidArgument: For block volume, if the input spec is invalid like createSpecs size is not equal to 1, backing disk ID in backing object details is empty and datastores is empty, volume metadata in input spec is invalid, backing disk ID in backing object details is not present, datastore is invalid, entityMetadata containing duplicate entity types, profile size is not equal to 1 etc.
For file volume, if the input spec is invalid like createSpecs size is not equal to 1, volume metadata in input spec is invalid, backing disk ID in backing object details is not present, entityMetadata containing duplicate entity types, profile size is not equal to 1 etc.
NotFound: if the volume can not be found.
CnsFault: Thrown for all other failure scenario.
"MethodFault Object"
Fault which is the cause of this fault.
Message which has details about the error Message can also contain a key to message catalog which can be used to generate better localized messages.
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/vsan/CnsVolumeManager/{moId}/CnsCreateVolume