After you define a VM storage policy in vSphere, you can apply it to a virtual machine. You apply the storage policy when provisioning the virtual machine or configuring its virtual disks. Depending on its type and configuration, the policy might serve different purposes. The policy can select the most appropriate datastore for the virtual machine and enforce the required level of service. Or it can enable specific data services for the virtual machine and its disks.
If you do not specify the storage policy, the system uses a default storage policy that is associated with the datastore. If your storage requirements for the applications on the virtual machine change, you can modify the storage policy that was originally applied to the virtual machine.
Assign Storage Policies to Virtual Machines
You can assign a VM storage policy in an initial deployment of a virtual machine or when you perform other virtual machine operations, such as cloning or migrating.
This topic describes how to assign the VM storage policy when you create a virtual machine. For information about other deployment methods that include cloning, deployment from a template, and so on, see the vSphere Virtual Machine Administration documentation.
You can apply the same storage policy to the virtual machine configuration file and all its virtual disks. If storage requirements for your virtual disks and the configuration file are different, you can associate different storage policies with the VM configuration file and the selected virtual disks.
Procedure
Results
What to do next
If storage placement requirements for the configuration file or the virtual disks change, you can later modify the virtual policy assignment.
Change Storage Policy Assignment for Virtual Machine Files and Disks
If your storage requirements for the applications on the virtual machine change, you can edit the storage policy that was originally applied to the virtual machine.
When changing the VM storage policy assignment, you can apply the same storage policy to the virtual machine configuration file and all its virtual disks. You can also associate different storage policies with the VM configuration file and the virtual disks. You might apply different policies when, for example, storage requirements for your virtual disks and the configuration file are different.
Procedure
Results
The storage policy is assigned to the virtual machine and its disks.
Check Compliance for a VM Storage Policy
You can check whether a virtual machine uses a datastore that is compatible with the storage requirements specified in the VM storage policy.
Prerequisites
Procedure
What to do next
When you cannot bring the noncompliant datastore into compliance, migrate the files or virtual disks to a compatible datastore. See Find Compatible Storage Resource for Noncompliant Virtual Machine.
If the status is Out of Date, reapply the policy to the objects. See Reapply Virtual Machine Storage Policy.
Find Compatible Storage Resource for Noncompliant Virtual Machine
Determine which datastore is compatible with the storage policy that is associated with your virtual machine.
Occasionally, a storage policy that is assigned to a virtual machine can be in the noncompliant status. This status indicates that the virtual machine or its disks use datastores that are incompatible with the policy. You can migrate the virtual machine files and virtual disks to compatible datastores.
Use this task to determine which datastores satisfy the requirements of the policy.
Procedure
What to do next
You can migrate the virtual machine or its disks to one of the datastores in the list.
Reapply Virtual Machine Storage Policy
After you edit a storage policy that is already associated with a virtual machine object, you must reapply the policy. By reapplying the policy, you communicate new storage requirements to the datastore where the virtual machine object resides.
Prerequisites
The compliance status for a virtual machine is Out of Date. The status indicates that the policy has been edited, but the new requirements have not been communicated to the datastore.