- How to use VMware vSAN ReadyNode Configurator - Fri, Dec 17 2021
- VMware Tanzu Kubernetes Toolkit version 1.3 new features - Fri, Dec 10 2021
- Disaster recovery strategies for vCenter Server appliance VM - Fri, Nov 26 2021
SPBM provides a universal framework for different types of storage, whether they be vSAN, virtual volumes, input/output (I/O) filters, or other storage methods. It provides a universal control plane across multiple data services and storage solutions.
On one side there are storage capabilities of storage arrays—VMware vSAN and others, and on the other side there is virtual machine (VM) provisioning based on VM storage policies.
In between there is bidirectional communication between ESXi and vCenter Server (on one end) and storage arrays and entities on the other.
The admin can build different storage policies, select capabilities of the underlying storage array, and then apply the policies to VMs. It is possible to create tags and tag categories and then apply these to the storage medium to define their capabilities.
SPBM looks at the storage requirements found in policies associated with individual VMs and then places the VM on the right storage tier. The available capabilities vary by storage vendor.
After creating a storage policy, an admin can assign a VM (or just the data disk where an important database is located) to a more performant datastore or a subset of datastores without thinking of hardware that runs underneath.
Here is an example below.
How to create a storage policy
In this post, we'll create a VM storage policy based on tags.
One of the first actions when starting with SPBM is to tag the available datastores within our environment with custom metadata we must define. We'll have to create tags and tag categories.
The entire process of creating and managing storage policies usually has a few steps.
- Populate the VM Storage Policies interface with appropriate data.
- Create predefined storage policy components.
- Create VM storage policies.
- Apply the VM storage policies to the VMs.
- Verify the compliance for the VM storage policies.
VMFS and NFS datastores are not represented by storage provider. These datastores show their capabilities and data services in the VM Storage Policies interface.
You can use tags to encode information about these datastores. As an example, we can tag VMFS datastores as VMFS-Gold and VMFS-Silver to differentiate different levels of service they provide.
Then you enter a meaningful name for the category. As an example in our case, we can simply use TestStoragePolicy.
Once we have created the tag category, we'll need to create tags.
For the sake of simplicity, let's call the tag GoldStorage.
Tag the VMware vSphere datastores
Now that we have successfully created a tag category and tags, we can tag our datastores with these tags.
We can do this by right-clicking the datastore and then going to Tags & Custom Attributes.
Click "Assign Tag"
And then select the tag from the list. You can have many tags here, but we only have one in this example.
Create VMware VM storage policies
So finally, we've got to the point where all we have left is to create a VM storage policy. We'll use the shortcut from the main UI, or we can also do this via Menu > Policies and Profiles.
Go to "Policies and Profiles" via the menu
Then click the VM Storage Policies icon and click Create VM Storage Policy.
You'll get a new window where you'll have to enter some details.
Pick host-based services or datastore-specific rules or both. In our case, I've only checked the datastore-specific rules because I just want to show how to use the tag-based ones.
Click Next and pick the tag category we've created earlier.
Then on the next screen, you will see the datastore you have tagged during one of the earlier steps.
Create a new VM or clone an existing VM to test the storage policy
Finally, we can test our storage policy by either creating a new VM or cloning an existing VM so we can test the storage placement based on tags.
With SPBM, upon creating a VM, the storage policy automates selecting the datastores that fulfill the requirements listed within the storage policy.
As you can see, when choosing our "test policy," we can choose the compatible storage of our datastore that we tagged in our earlier step.
And it lists this datastore as "compatible," so we're sure to use the datastore with a capability we specified via a tag.
Note: As you can see on the image below, you can even provision a new VM and separate VMDKs. Examples have different performance datastores assigned to "system" and "data" disks.
You can assign two separate policies to each of the VM's disks. You can assign a mission-critical (Gold) policy to the disk that is a database. At the same time, you can apply some other storage (Silver) policy to the VM's operating system (OS).
VM storage-based policy is a very rich feature, and using just a small part of it (via tags) can ease a bit of the administration burden.
When using this with specific vendor-provided storage, the storage capabilities surface automatically. VMware vSphere uses a provider called vStorage APIs for Storage Awareness (VASA). These application program interfaces (APIs) let vSphere vCenter recognize the capabilities of storage arrays.
Today's storage arrays provide tiered storage all in a single device. However, storage policies give you a better way of defining the performance you want and allow software-driven provisioning of new VMs.
Subscribe to 4sysops newsletter!
VM storage policy is about your VMs and their performance; vSphere admins have a powerful tool to manage VMware infrastructures.