To create and manage storage policies for your virtual machines in vSphere, you use the VM Storage Policies interface.

Create a VM Storage Policy for VMFS Datastore

Create a custom storage policy compatible with VMFS datastores. In the storage policy, you can specify disk or volume provisioning options.

Prerequisites

Procedure

  1. Open the Create VM Storage Policy wizard.
    1. Click Menu > Policies and Profiles.
    2. Under Policies and Profiles, click VM Storage Policies.
    3. Click Create.
  2. Enter the policy name and description, and click Next.
    Option Action
    vCenter Server Select the vCenter Server instance.
    Name Enter the name of the storage policy, for example VMFS Storage Policy.
    Description Enter the description of the storage policy.
  3. On the Policy structure page under Datastore specific rules, enable rules for a target storage entity, VMFS storage.
    You can enable rules for several datastores. Multiple rule sets allow a single policy to define alternative storage placement parameters, often from several storage providers.
  4. On the VMFS rules page, define storage placement rules for the target VMFS datastore.
    1. Click the Placement tab.
    2. From the Volume allocation drop-down menu, select one of the following options.
      Option Description
      Conserve space when possible Use to create a virtual disk of volume in thin format. The option neither guarantees space reservation nor runtime performance. This option gives fast provisioning time but the space is allocated on demand and the blocks are also initialized on demand.
      Fully initialized Use to create a disk or volume in thick provision eager zeroed format. The option guarantees that the required space is reserved on the datastore and all the blocks of the disk are zeroed. This option gives the best runtime performance, but provisioning time is proportional to the size of the disk.
      Reserve space Use to create a disk or volume in thick provision lazy zeroed format. The option guarantees that the required space is reserved on the datastore. The blocks of the disk are not zeroed, so there are no guarantee on the runtime performance.
    3. To fine-tune your placement request further, click the Tags tab and add a tag-based rule.
      Tag-based rules can filter datastores by including or excluding specific placement criteria. For example, your VM storage policy can include VMFS datastores located in Texas and California, but exclude datastores located in Nevada.

Create a VM Storage Policy for Host-Based Data Services

To define the VM storage policy in the vSphere Client, use the Create VM Storage Policy wizard. In this task, you create rules for data services offered by ESXi hosts. The VM storage policy that includes these rules activates specified data services for the virtual machine.

Available data services include encryption, I/O control, caching, and so on. Certain data services, such as encryption, are provided by VMware. Others can be offered by third-party I/O filters that you install on your host.

The data services are usually generic for all types of storage and do not depend on a datastore. Adding datastore-specific rules to the storage policy is optional.

If you add datastore-specific rules, and both the I/O filters on the host and storage offer the same type of service, for example, encryption, your policy can request this service from both providers. As a result, the virtual machine data is encrypted twice, by the I/O filter and your storage. However, replication provided by Virtual Volumes and replication provided by the I/O filter cannot coexist in the same storage policy.

Prerequisites

Procedure

  1. Open the Create VM Storage Policy wizard.
    1. Click Menu > Policies and Profiles.
    2. Under Policies and Profiles, click VM Storage Policies
    3. Click Create.
  2. Enter the policy name and description, and click Next.
    Option Action
    vCenter Server Select the vCenter Server instance.
    Name Enter the name of the storage policy.
    Description Enter the description of the storage policy.
  3. On the Policy structure page under Host based services, click Enable host based rules.
  4. On the Host based services page, define rules and configure data services provided by your host.
    1. Click the tab for the data service category, for example, Encryption.
    2. Define custom rules for the data service category or use predefined components.
      Option Description
      Disabled This is a default setting.
      Use storage policy component Select a storage policy component from the drop-down menu. This option is available only if you have predefined components in your database.
      Custom Define custom rules for the data service category by specifying an appropriate provider and values for the rules.
      Note: You can activate several data services. If you use encryption with other data services, use the custom encryption option and set the Allow I/O filters before encryption parameter to True. The parameter ensures that other services, such as replication, can analyze clear text data before it is encrypted.
  5. On the Storage compatibility page, review the list of datastores that match this policy.
    To be compatible with the policy for host-based services, datastores must be connected to the host that provides these services. If you add datastore-specific rule sets to the policy, the compatible datastores must also satisfy storage requirements of the policy.
  6. On the Review and finish page, review the storage policy settings and click Finish.
    To change any settings, click Back to go to the relevant page.

Results

The new VM storage policy for host-based data services appears on the list.

Create a VM Storage Policy for Virtual Volumes

To define the VM storage policy in the vSphere Client, use the Create VM Storage Policy wizard. In this task, you create a custom storage policy compatible with Virtual Volumes. When you define the VM storage policy for Virtual Volumes, you create rules to configure storage and data services provided by the Virtual Volumes datastore. The rules are applied when the VM is placed on the Virtual Volumes datastore. The custom storage policy can replace the default No Requirements storage policy for Virtual Volumes that VMware provides.

The procedure assumes that you are creating the VM storage policy for Virtual Volumes. For information about the vSAN storage policy, see the Administering VMware vSAN documentation.

Prerequisites

Procedure

  1. Open the Create VM Storage Policy wizard.
    1. Click Menu > Policies and Profiles.
    2. Under Policies and Profiles, click VM Storage Policies.
    3. Click Create.
  2. Enter the policy name and description, and click Next.
    Option Action
    vCenter Server Select the vCenter Server instance.
    Name Enter the name of the storage policy, for example Virtual Volumes Storage Policy.
    Description Enter the description of the storage policy.
  3. On the Policy structure page under Datastore specific rules, enable rules for a target storage entity, such as Virtual Volumes storage.
    You can enable rules for several datastores. Multiple rule sets allow a single policy to define alternative storage placement parameters, often from several storage providers.
  4. On the Virtual Volumes rules page, define storage placement rules for the target Virtual Volumes datastore.
    1. Click the Placement tab and click Add Rule.
    2. From the Add Rule drop-down menu, select available capability and specify its value.
      For example, you can specify the number of read operations per second for the Virtual Volumes objects.

      You can include as many rules as you need for the selected storage entity. Verify that the values you provide are within the range of values that the Virtual Volumes datastore advertises.

    3. To fine-tune your placement request further, click the Tags tab and add a tag-based rule.
      Tag-based rules can filter datastores by including or excluding specific placement criteria. For example, your VM storage policy can include Virtual Volumes datastores located in Texas and California, but exclude datastores located in Nevada.
  5. (Optional) Define rules to configure datastore-specific services.
    The data services, such as encryption, caching, or replication, are offered by the storage. The VM storage policy that references data services, requests these services for the VM when the VM is placed to the Virtual Volumes datastore.
    1. Click the tab for the data service category, for example, Replication.
    2. Define custom rules for the data service category or use predefined components.
      Option Description
      Disabled This is a default setting.
      Use storage policy component Select a storage policy component from the drop-down menu. This option is available only if you have predefined components in your database.
      Custom Define custom rules for the data service category by specifying an appropriate provider and values for the rules.
  6. On the Storage compatibility page, review the list of datastores that match this policy.
    If the policy includes several rule sets, the datastore must satisfy at least one rule set and all rules within this set.
  7. On the Review and finish page, review the storage policy settings and click Finish.
    To change any settings, click Back to go to the relevant page.

Results

The new VM storage policy compatible with Virtual Volumes appears on the list.

What to do next

You can now associate this policy with a virtual machine, or designate the policy as default.

Create a VM Storage Policy for Tag-Based Placement

Tag-based rules reference the tags that you assign to the datastores and can filter the datastores to be used for placement of the VMs. To define tag-based placement in the vSphere Client, use the Create VM Storage Policy wizard.

Note: At a datastore cluster level, you can use a tag-based storage policy only when all datastores in the cluster have consistent tags.

Prerequisites

  • Make sure that the VM Storage Policies interface is populated with information about storage entities and data services that are available in your storage environment. See Populating the VM Storage Policies Interface in vSphere.
  • Required privileges: VM storage policies.Update and VM storage policies.View.

Procedure

  1. Open the Create VM Storage Policy wizard.
    1. Click Menu > Policies and Profiles.
    2. Under Policies and Profiles, click VM Storage Policies.
    3. Click Create.
  2. Enter the policy name and description, and click Next.
    Option Action
    vCenter Server Select the vCenter Server instance.
    Name Enter the name of the storage policy.
    Description Enter the description of the storage policy.
  3. On the Policy structure page under Datastore specific rules, enable tag-based placement rules.
  4. On the Tag based placement page, create the tag rules.
    1. Click Add Tag Rule and define tag-based placement criteria. Use the following as an example.
      Option Example
      Tag category Level of Service
      Usage option Use storage tagged with
      Tags Gold
      All datastores with the Gold tag become compatible as the storage placement target.
    2. (Optional) Add more tag-based rules.
  5. On the Storage compatibility page, review the list of datastores that match this policy.
  6. On the Review and finish page, review the storage policy settings and click Finish.
    To change any settings, click Back to go to the relevant page.

Results

The new VM storage policy compatible with tagged datastores appears on the list.

Edit or Clone a VM Storage Policy

If storage requirements for virtual machines and virtual disks change, you can modify the existing storage policy. You can also create a copy of the existing VM storage policy by cloning it. While cloning, you can optionally select to customize the original storage policy.

Prerequisites

Required privilege: StorageProfile.View

Procedure

  1. In the vSphere Client, navigate to the storage policy.
    1. Click Menu > Policies and Profiles.
    2. Under Policies and Profiles, click VM Storage Policies.
  2. Select the storage policy, and click one of the following icons:
    • Edit
    • Clone
  3. (Optional) Modify the policy and click OK.
  4. If editing the storage policy that is used by a virtual machine, reapply the policy to the virtual machine.
    Option Description
    Manually later If you select this option, the compliance status for all virtual disks and virtual machine home objects associated with the storage policy changes to Out of Date. To update configuration and compliance, manually reapply the storage policy to all associated entities. See Reapply Virtual Machine Storage Policy.
    Now Update virtual machine and compliance status immediately after editing the storage policy.