New-WMNamespaceStoragePolicy
This cmdlet creates a storage claim for a workload namespace using the specified configuration. The storage claim is expressed as a storage policy and parameters of the claim. The cmdlet requires a connection to vCenter Server using the Connect-VIServer cmdlet.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
Namespace | WMNamespace | named |
|
Specifies the workload namespace that you want to use the storage. |
required
|
StoragePolicy | SpbmStoragePolicy | named |
|
Specifies the storage policy that you want to apply to the storage used by the specified workload namespace. |
optional | LimitMiB | Int64 | named |
|
Specifies the limit on the storage used by workloads running in the specified workload namespace. |
optional | ProgressAction | ActionPreference | named |
|
|
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.WorkloadManagement.Types.V1.WMNamespaceStoragePolicyExamples
Example 1
$ns = Get-WMNamespace "MyNamespace" $sp = Get-SpbmStoragePolicy "MyStoragePolicy" New-WMNamespaceStoragePolicy -Namespace $ns -StoragePolicy $sp
Creates a storage claim for the workload namespace "MyNamespace". The storage policy "MyStoragePolicy" would be applied to the storage used by workloads running in this workload namespace. There would be no limit on the storage used by those workloads.
Example 2
New-WMNamespaceStoragePolicy -Namespace "MyNamespace" -StoragePolicy "MyStoragePolicy" -LimitMiB 2048
Creates a storage claim for the workload namespace "MyNamespace". The storage policy "MyStoragePolicy" would be applied to the storage used by workloads running in this workload namespace. There would a limit of 2048 MiB on the storage used by those workloads.
Related Commands
WMNamespace
This cmdlet retrieves the workload namespaces in the vCenter Server system.
This cmdlet creates a new workload namespace on the specified cluster.
This cmdlet deletes a workload namespace from the vCenter Server system.
This cmdlet modifies the configuration of a workload namespace.
WMNamespaceLimits
Retrieves information about the Kubernetes resource limits of a namespace.
Changes the Kubernetes resource limits of a namespace.
WMNamespaceNetworkSpec
Creates a specification for a namespace network. The specification is later used to create the actual namespace network.
WMNamespacePermission
Retrieves information about workload namespace access permissions.
Grants an access permission to a workload namespace.
Removes an access permission to a workload namespace.
Modifies an access permission to a workload namespace.
WMNamespaceStoragePolicy
This cmdlet retrieves the configuration of the storage claimed by a workload namespace.
This cmdlet creates a storage claim for a workload namespace using the specified configuration.
This cmdlet deletes the storage claim for a workload namespace associated with a specified storage policy.
This cmdlet modifies the configuration of a storage claim used by a workload namespace.