New-CnsVolume
This cmdlet creates a Cloud Native Storage (CNS) volume.
Syntax
-Name <String>
-StaticFileShare
[-CnsVolumeMetadata <CnsVolumeMetadata>]
[-RunAsync]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VsanFileShare | named |
|
Specifies the vSAN file share backing for a container volume. | required |
|
String | named |
|
Specifies the name of the CNS volume. | required |
|
SwitchParameter | named |
|
Indicates that the StaticFileShareCnsVolume parameter is set. | optional |
|
CnsVolumeMetadata | named |
|
Specifies the metadata for the CNS volume. | optional |
|
SwitchParameter | named |
|
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. |
-Datastore <Datastore[]>
-DynamicBlock
-Name <String>
[-CnsVolumeMetadata <CnsVolumeMetadata>]
[-RunAsync]
[-Server <VIServer[]>]
[-StoragePolicy <SpbmStoragePolicy>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
Int64 | named |
|
Specifies the container volume capacity in MB. | required |
|
Datastore[] | named |
|
Specifies the datastores that you want to use for the volume placement. In case of multiple placement candidate datastores, the server selects one datastore (subject to change) based on various factors such as storage policy and available free space. | required |
|
SwitchParameter | named |
|
Indicates that the DynamicBlockCnsVolume parameter is set. | required |
|
String | named |
|
Specifies the name of the CNS volume. | optional |
|
CnsVolumeMetadata | named |
|
Specifies the metadata for the CNS volume. | optional |
|
SwitchParameter | named |
|
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. | optional |
|
SpbmStoragePolicy | named |
|
Specifies the storage profile for the container volume. A vSAN datastore default policy is used when this field is not set. |
-Datastore <Datastore[]>
-DynamicFileShare
-FileShareNetworkPermission <VsanFileShareNetworkPermission[]>
-Name <String>
[-CnsVolumeMetadata <CnsVolumeMetadata>]
[-RunAsync]
[-Server <VIServer[]>]
[-SoftQuotaGB <Decimal>]
[-StoragePolicy <SpbmStoragePolicy>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
Int64 | named |
|
Specifies the container volume capacity in MB. | required |
|
Datastore[] | named |
|
Specifies the datastores that you want to use for the volume placement. In case of multiple placement candidate datastores, the server selects one datastore (subject to change) based on various factors such as storage policy and available free space. | required |
|
SwitchParameter | named |
|
Indicates that the DynamicFileShareCnsVolume parameter is set. | required |
|
VsanFileShareNetworkPermission[] | named |
|
Specifies the permission parameters that you want to use for this vSAN file share. If this field is not set, no user can access this vSAN file share. | required |
|
String | named |
|
Specifies the name of the CNS volume. | optional |
|
CnsVolumeMetadata | named |
|
Specifies the metadata for the CNS volume. | optional |
|
SwitchParameter | named |
|
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. | optional |
|
Decimal | named |
|
Specifies the soft quota configuration at the vSAN file share level. This is the soft quota for the file share. | optional |
|
SpbmStoragePolicy | named |
|
Specifies the storage profile for the container volume. A vSAN datastore default policy is used when this field is not set. |
-StaticBlock
-VDisk <VDisk>
[-CnsVolumeMetadata <CnsVolumeMetadata>]
[-RunAsync]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
String | named |
|
Specifies the name of the CNS volume. | required |
|
SwitchParameter | named |
|
Indicates that the StaticBlockCnsVolume parameter is set. | required |
|
VDisk | named |
|
Specifies the block backing for a container volume. | optional |
|
CnsVolumeMetadata | named |
|
Specifies the metadata for the CNS volume. | optional |
|
SwitchParameter | named |
|
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. |
Output
VMware.VimAutomation.Storage.Types.V1.Vsan.Cns.CnsVolume
Examples
Example 1
Creates a CNS volume with 'test-cns' as ?? volume name, $vdisk as ?? block backing for a container volume, and $metadata as a CNS volume metadata.
Example 2
Creates a CNS volume with 'test-cns' as a volume name, $fileshare as a file share backing for a container volume, and $metadata as a CNS volume metadata.
Example 3
Creates a CNS volume dynamically with 'test-cns' as a volume name, '1024' as a container volume capacity in MB, $datastore as a CNS volume placement, and $metadata as a CNS volume metadata.
Example 4
Creates a CNS volume with 'test-cns' as ?? volume name, '1024' as ?? container volume capacity in MB, $datastore as ?? CNS volume placement, $metadata as a CNS volume metadata, and '1' soft quota for a file share in GB.
Related Commands
CnsContainerCluster
CnsKubernetesEntityMetadata
CnsKubernetesEntityReference
CnsVolume
CnsVolumeAttachment