New-CnsVolume

This cmdlet creates a Cloud Native Storage (CNS) volume.

Syntax

-FileShare  <VsanFileShare>
-Name  <String>
-StaticFileShare
[-CnsVolumeMetadata  <CnsVolumeMetadata>]
[-RunAsync]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
FileShare
VsanFileShare named
  • pipeline
  • Specifies the vSAN file share backing for a container volume.
    required
    Name
    String named Specifies the name of the CNS volume.
    required
    StaticFileShare
    SwitchParameter named Indicates that the StaticFileShareCnsVolume parameter is set.
    optional
    CnsVolumeMetadata
    CnsVolumeMetadata named Specifies the metadata for the CNS volume.
    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
  • wildcards
  • 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.

    -CapacityMB  <Int64>
    -Datastore  <Datastore[]>
    -DynamicBlock
    -Name  <String>
    [-CnsVolumeMetadata  <CnsVolumeMetadata>]
    [-RunAsync]
    [-Server  <VIServer[]>]
    [-StoragePolicy  <SpbmStoragePolicy>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    CapacityMB
    Int64 named Specifies the container volume capacity in MB.
    required
    Datastore
    Datastore[] named
  • pipeline
  • 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
    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
  • wildcards
  • 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
  • pipeline
  • Specifies the storage profile for the container volume. A vSAN datastore default policy is used when this field is not set.

    -CapacityMB  <Int64>
    -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
    CapacityMB
    Int64 named Specifies the container volume capacity in MB.
    required
    Datastore
    Datastore[] named
  • pipeline
  • 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
    DynamicFileShare
    SwitchParameter named Indicates that the DynamicFileShareCnsVolume parameter is set.
    required
    FileShareNetworkPermission
    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
    Name
    String named Specifies the name of the CNS volume.
    optional
    CnsVolumeMetadata
    CnsVolumeMetadata named Specifies the metadata for the CNS volume.
    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
  • wildcards
  • 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
    SoftQuotaGB
    Decimal named Specifies the soft quota configuration at the vSAN file share level. This is the soft quota for the file share.
    optional
    StoragePolicy
    SpbmStoragePolicy named
  • pipeline
  • Specifies the storage profile for the container volume. A vSAN datastore default policy is used when this field is not set.

    -Name  <String>
    -StaticBlock
    -VDisk  <VDisk>
    [-CnsVolumeMetadata  <CnsVolumeMetadata>]
    [-RunAsync]
    [-Server  <VIServer[]>]
    [CommonParameters]

    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
  • pipeline
  • Specifies the block backing for a container volume.
    optional
    CnsVolumeMetadata
    CnsVolumeMetadata named Specifies the metadata for the CNS volume.
    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
  • wildcards
  • 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

    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

    Feedback

    Was this page helpful?