VMware Virtual Machine Storage Policies fall under the realm of Storage Policy Based Management that assists with virtual machine provisioning. When defined, Storage Based Policies define which type(s) of storage are presented for the virtual machine and how the virtual machine is placed within storage and also data services. There are certain builtin storage policies that are provided as default selections. However, built-in VASA providers can present storage based on vendor capabilities and functionality and also we can create and assign custom storage policies as well. With custom VM storage policies we can “tag” storage with certain tag metadata so that VMs are placed accordingly to the levels of service our application requires based on tags we define. Let’s take a look at creating storage polices, using VMware VM storage policies, and how we can assign these policies to virtual machines we provision.
Create Tags Category and Tags to Assign to Storage
Our first step to using storage policies if we want to tag our datastores with custom metadata that we define is to create tag category and tags. First we select to create a new tag category. Click the Categories button and the + sign.
Here we need to define the tag category to include object types Datastore and Datastore Cluster.
Now that we have our tag category defined, we can create a new tag. I am simply calling the tag iSCSI+datastore for the lab.
Now that we have our tag category and tags in place, we can tag our Datastore(s) with specific tags that we want to use to define our policy.
Tag the VMware vSphere Datastore(s)
Now we will assign the new tag to the datastore of our choosing. Right click your datastore and select the Assign Tag option from the Tags & Custom Attributes menu option.
Now, we select our tag we created.
Creating VMware Virtual Machine Storage Policies
The process to create VMware virtual machine storage policies is fairly straightforward. In this walkthrough, I will be using the HTML5 web client to create the policy. The first thing we do is navigate to Menu >> Policies and Profiles in the web client, or the Home button >> Polices and Profiles.
In Step 1, we add a name and description to our new VM storage policy.
Next we select either Host based services or Datastore specific rules, or both. Here I have both selected.
- Host based services – Create rules for data services provided by hosts including encryption and I/O control
- Datastore specific rules – Rules for different storage types, these can come from VASA or custom tags. Note about VASA – The list of storage capabilities that a storage array can deliver is defined and published by the storage array’s storage provider service. Using vStorage APIs for Storage Awareness VASA the storage prividers inform vCenter Server about the specific storage device characteristics and capabilities. These are vendor specific.
Under the Host based services, we can configure options for Encryption or Storage I/O control.
I configured a custom Storage I/O Control using the default values provided.
Note If you don’t have any storage related tag categories defined, you will see the error on the Tag based placement screen showing No storage related tag categories available.
However, once we have the tag category and tags in place, we can add the tag we created earlier.
Now we have defined our tag category and Usage option along with defined tags.
Since we tagged our storage earlier with the custom storage tag, we see it listed in the Compatible storage.
Finally, we review the custom VM Storage Policy we are about to create.
Using VMware VM Storage Policies
As we can see below, when we get to the Select storage screen, we can select the custom VM Storage Policy which results in the compatible datastore.
Using VMware VM Storage Policies are a powerful tool that administrators can use to allow the software to drive where VMs are placed in the infrastructure. With the power of today’s storage arrays often delivering tiered storage all in a single device, using storage policies allows a much more powerful way of defining the desired performance and provisioning of new virtual machines. VASA provided capabilities from manufacturers or custom tags can provide directives for delivering expected performance by defining this at the virtual machine level.