New-CnsVolume
This cmdlet creates a Cloud Native Storage (CNS) volume.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
CapacityMB | Int64 | named |
|
Specifies the container volume capacity in MB. |
required
|
Datastore | 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
|
DynamicBlock | SwitchParameter | named |
|
Indicates that the DynamicBlockCnsVolume parameter is set. |
required
|
Name | String | named |
|
Specifies the name of the CNS volume. |
optional | CnsVolumeMetadata | CnsVolumeMetadata | named |
|
Specifies the metadata for the CNS volume. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | RunAsync | 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 | Server | 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 | StoragePolicy | SpbmStoragePolicy | named |
|
Specifies the storage profile for the container volume. A vSAN datastore default policy is used when this field is not set. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
Name | String | named |
|
Specifies the name of the CNS volume. |
required
|
StaticBlock | SwitchParameter | named |
|
Indicates that the StaticBlockCnsVolume parameter is set. |
required
|
VDisk | VDisk | named |
|
Specifies the block backing for a container volume. |
optional | CnsVolumeMetadata | CnsVolumeMetadata | named |
|
Specifies the metadata for the CNS volume. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | RunAsync | 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 | Server | 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.CnsVolumeExamples
Example 1
New-CnsVolume -Name 'test-cns' -VDisk $vdisk -CnsVolumeMetadata $metadata -StaticBlock
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
New-CnsVolume -Name 'test-cns' -FileShare $fileshare -CnsVolumeMetadata $metadata -StaticFileShare
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
New-CnsVolume -Name 'test-cns' -CnsVolumeMetadata $metadata -CapacityMB 1024 -Datastore $datastore -DynamicBlock
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
New-CnsVolume -Name 'test-fileshare' -CnsVolumeMetadata $metadata -CapacityMB 1024 -Datastore $datastore -FileShareNetworkPermission $permission -SoftQuotaGB 1 -DynamicFileShare
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
This cmdlet creates a vSAN file service IP configuration at the client side.
CnsKubernetesEntityMetadata
This cmdlet creates a Cloud Native Storage (CNS) Kubernetes entity metadata at a client side.
CnsKubernetesEntityReference
This cmdlet creates a Cloud Native Storage (CNS) Kubernetes entity reference at the client side.
CnsVolume
This cmdlet retrieves a Cloud Native Storage (CNS) volume based on the name or ID filter.
This cmdlet creates a Cloud Native Storage (CNS) volume.
This cmdlet removes the specified Cloud Native Storage (CNS) volumes.
This cmdlet modifies the Cloud Native Storage (CNS) volume metadata of a specified CNS volume.
CnsVolumeAttachment
New-CnsVolumeAttachment -CnsVolume <CnsVolume> -VM <VirtualMachine> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-CnsVolumeAttachment -CnsVolume <CnsVolume> -VM <VirtualMachine> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
CnsVolumeMetadata
This cmdlet creates a Cloud Native Storage (CNS) volume metadata at the client side.