Edit

Share via


Configure storage policy

VMware vSAN storage policies define storage requirements for your virtual machines (VMs). These policies guarantee the required level of service for your VMs because they determine how storage is allocated to the VM. Each VM deployed to a vSAN datastore is assigned at least one VM storage policy.

You can assign a VM storage policy in an initial deployment of a VM or when you do other VM operations, such as cloning or migrating. Post-deployment cloudadmin users or equivalent roles can't change the default storage policy for a VM. However, VM storage policy per disk changes is permitted.

The Run command lets authorized users change the default or existing VM storage policy to an available policy for a VM post-deployment. There are no changes made on the disk-level VM storage policy. You can always change the disk level VM storage policy as per your requirements.

Note

Run commands are executed one at a time in the order submitted.

In this article learn how to:

  • List all storage policies
  • Set the storage policy for a VM
  • Specify default storage policy for a cluster
  • Create storage policy
  • Remove storage policy

Prerequisites

Make sure that the minimum level of hosts are met.

RAID configuration Failures to tolerate (FTT) Minimum hosts required
RAID-1 (Mirroring)
Default setting.
1 3
RAID-5 (Erasure Coding) 1 4
RAID-1 (Mirroring) 2 5
RAID-6 (Erasure Coding) 2 6
RAID-1 (Mirroring) 3 7

List storage policies

Run the Get-StoragePolicy cmdlet to list the vSAN based storage policies available to set on a VM.

  1. Sign in to the Azure portal.

    Note

    If you need access to the Azure US Gov portal, go to https://portal.azure.us/

  2. Select Run command > Packages > Get-StoragePolicies.

    Screenshot showing how to access the storage policy run commands available.

  3. Provide the required values or change the default values, and then select Run.

    Screenshot showing how to list storage policies available.

    Field Value
    Retain up to Retention period of the cmdlet output. The default value is 60.
    Specify name for execution Alphanumeric name, for example, Get-StoragePolicies-Exec1.
    Timeout The period after which a cmdlet exits if taking too long to finish.
  4. Check Notifications to see the progress.

Set storage policy on VM

Run the Set-VMStoragePolicy cmdlet to modify vSAN-based storage policies on a default cluster, individual VM, or group of VMs sharing a similar VM name. For example, if you have three VMs named "MyVM1", "MyVM2", and "MyVM3", supplying "MyVM*" to the VMName parameter would change the StoragePolicy on all three VMs.

Note

You cannot use the vSphere Client to change the default storage policy or any existing storage policies for a VM.

  1. Select Run command > Packages > Set-VMStoragePolicy.

  2. Provide the required values or change the default values, and then select Run.

    Field Value
    VMName Name of the target VM.
    StoragePolicyName Name of the storage policy to set. For example, RAID-FTT-1.
    Retain up to Retention period of the cmdlet output. The default value is 60.
    Specify name for execution Alphanumeric name, for example, changeVMStoragePolicy.
    Timeout The period after which a cmdlet exits if taking too long to finish.
  3. Check Notifications to see the progress.

Set storage policy on all VMs in a location

Run the Set-LocationStoragePolicy cmdlet to Modify vSAN based storage policies on all VMs in a location where a location is the name of a cluster, resource pool, or folder. For example, if you have 3 VMs in Cluster-3, supplying "Cluster-3" would change the storage policy on all three VMs.

Note

You cannot use the vSphere Client to change the default storage policy or any existing storage policies for a VM.

  1. Select Run command > Packages > Set-LocationStoragePolicy.

  2. Provide the required values or change the default values, and then select Run.

    Field Value
    Location Name of the target VM.
    StoragePolicyName Name of the storage policy to set. For example, RAID-FTT-1.
    Retain up to Retention period of the cmdlet output. The default value is 60.
    Specify name for execution Alphanumeric name, for example, changeVMStoragePolicy.
    Timeout The period after which a cmdlet exits if taking too long to finish.
  3. Check Notifications to see the progress.

Specify storage policy for a cluster

Run the Set-ClusterDefaultStoragePolicy cmdlet to specify default storage policy for a cluster,

  1. Select Run command > Packages > Set-ClusterDefaultStoragePolicy.

  2. Provide the required values or change the default values, and then select Run.

    Field Value
    ClusterName Name of the cluster.
    StoragePolicyName Name of the storage policy to set. For example, RAID-FTT-1.
    Retain up to Retention period of the cmdlet output. The default value is 60.
    Specify name for execution Alphanumeric name, for example, Set-ClusterDefaultStoragePolicy-Exec1.
    Timeout The period after which a cmdlet exits if taking too long to finish.
  3. Check Notifications to see the progress.

Create custom AVS storage policy

Run the New-AVSStoragePolicy cmdlet to create or overwrite an existing policy. This function creates a new or overwrites an existing vSphere Storage Policy. Non vSAN-Based, vSAN Only, VMEncryption Only, Tag Only based and/or any combination of these policy types are supported.

Note

You cannot modify existing AVS default storage policies. Certain options enabled in storage policies will produce warnings to associated risks.

  1. Select Run command > Packages > New-AVSStoragePolicy.

  2. Provide the required values or change the default values, and then select Run.

    Field Value
    Overwrite Overwrite existing Storage Policy.
    - Default is $false.
    - Passing overwrite true provided overwrites an existing policy exactly as defined.
    - Those values not passed are removed or set to default values.
    NotTags Match to datastores that do NOT have these tags.
    - Tags are case sensitive.
    - Comma separate multiple tags.
    - Example: Tag1,Tag 2,Tag_3
    Tags Match to datastores that do have these tags.
    - Tags are case sensitive.
    - Comma separate multiple tags.
    - Example: Tag1,Tag 2,Tag_3
    vSANForceProvisioning Force provisioning for the policy.
    - Default is $false.
    - Valid values are $true or $false
    - WARNING - vSAN Force Provisioned Objects aren't covered under Microsoft SLA. Data LOSS and vSAN instability can occur.
    - Recommended value is $false.
    vSANChecksumDisabled Enable or disable checksum for the policy.
    - Default is $false.
    - Valid values are $true or $false.
    - WARNING - Disabling checksum can lead to data LOSS and/or corruption.
    - Recommended value is $false.
    vSANCacheReservation Percentage of cache reservation for the policy.
    - Default is 0.
    - Valid values are 0..100.
    vSANIOLimit Sets limit on allowed IO.
    - Default is unset.
    - Valid values are 0..2147483647.
    - IOPS limit for the policy.
    vSANDiskStripesPerObject The number of HDDs across which each replica of a storage object is striped.
    - Default is 1. Valid values are 1..12.
    - A value higher than 1 may result in better performance (for example, when flash read cache misses need to get serviced from HDD), but also results in higher use of system resources.
    vSANObjectSpaceReservation Object Reservation.
    - Default is 0.
    - Valid values are 0..100.
    - 0=Thin Provision
    - 100=Thick Provision
    VMEncryption Sets VM Encryption.
    - Default is None.
    - Valid values are None, Pre-IO, Post-IO.
    - Pre-IO allows VAIO filtering solutions to capture data prior to VM encryption.
    - Post-IO allows VAIO filtering solutions to capture data after VM encryption.
    vSANFailuresToTolerate Number of vSAN Hosts failures to Tolerate.
    - Default is "R1FTT1".
    - Valid values are "None", "R1FTT1", "R1FTT2", "R1FTT3", "R5FTT1", "R6FTT2", "R1FTT3"
    - None = No Data Redundancy
    - R1FTT1 = 1 failure - RAID-1 (Mirroring)
    - R1FTT2 = 2 failures - RAID-1 (Mirroring)
    - R1FTT3 = 3 failures - RAID-1 (Mirroring)
    - R5FTT1 = 1 failure - RAID-5 (Erasure Coding),
    - R6FTT2 = 2 failures - RAID-6 (Erasure Coding)
    - No Data Redundancy options aren't covered under Microsoft SLA.
    vSANSiteDisasterTolerance Only valid for stretch clusters.
    - Default is "None".
    - Valid Values are "None", "Dual", "Preferred", "Secondary", "NoneStretch"
    - None = No Site Redundancy (Recommended Option for Non-Stretch Clusters, NOT recommended for Stretch Clusters)
    - Dual = Dual Site Redundancy (Recommended Option for Stretch Clusters)
    - Preferred = No site redundancy - keep data on Preferred (stretched cluster)
    - Secondary = No site redundancy - Keep data on Secondary Site (stretched cluster)
    - NoneStretch = No site redundancy - Not Recommended (https://kb.vmware.com/s/article/88358)
    Description Description of Storage Policy you're creating, free form text.
    Name Name of the storage policy to set. For example, RAID-FTT-1.
    Retain up to Retention period of the cmdlet output. The default value is 60.
    Specify name for execution Alphanumeric name, for example, New-AVSStoragePolicy-Exec1.
    Timeout The period after which a cmdlet exits if taking too long to finish.
  3. Check Notifications to see the progress.

Remove AVS Storage Policy

Run the Remove-AVSStoragePolicy cmdlet to specify default storage policy for a cluster,

  1. Select Run command > Packages > Remove-AVSStoragePolicy.

  2. Provide the required values or change the default values, and then select Run.

    Field Value
    Name Name of Storage Policy. Wildcards aren't supported and will be stripped.
    Retain up to Retention period of the cmdlet output. The default value is 60.
    Specify name for execution Alphanumeric name, for example, Remove-AVSStoragePolicy-Exec1.
    Timeout The period after which a cmdlet exits if taking too long to finish.
  3. Check Notifications to see the progress.

Next steps

Now that you learned how to configure VMware vSAN storage policies, learn more about: