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 how-to, you learn how to:

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

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

You'll 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

You'll 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

You'll 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 3 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

You'll 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.

Next steps

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