In our last 2 posts of this series we discussed about VSAN Architecture and walked through steps needed to configure VSAN. If you have missed earlier posts of this series you can read them from here:
In this post we will discuss Storage Policies and its role in a vSAN environment.
Storage policy based management and implementation is an important part of software defined storage and software defined datacenter. VMware vSAN is one of the most robust and most complete implementation of storage policy based management.
When you use Virtual SAN, you can define virtual machine storage requirements, such as performance and availability, in the form of a policy. The policy requirements are then pushed down to the Virtual SAN layer when a virtual machine is being created. The virtual disk is distributed across the Virtual SAN datastore to meet the requirements.
When you enable Virtual SAN on a cluster, a single Virtual SAN datastore is created which represents all the storage in vSAN cluster. In addition, enabling Virtual SAN configures and registers Virtual SAN storage providers.
You can locate vSphere storage providers by navigating to vCenter server > Manage > Storage Providers
This is where we see a VASA enabled/capable disk array. With vSAN this is supposed to have automatically been done for each of the Esxi hosts that are part of vSAN cluster.
VM storage profiles allows for the capabilities of the underlying storage to be presented to administrators for easier assignment to virtual machines.
Note: if you are ruuning older version of vSAN, then there was a known bug where vCenter Server and vSAN cluster get out of sync causing VASA providers did not get created automatically. And becuase of that you cannot create storage policies. To remediate this you have to manually create the entries for the storage providers.
The process to create storage provider entries is fairly simple. Navigate to vCenter Server > Manage > Storage Providers.
Click on green + button and add the entries as below:
Name: Name for the storage provider
URL : http://esxi-fqdn:8080/version.xml
Password: Password of root user on esxi host
In my case Storage Providers were already listed as I am using latest version of vSAN in my lab
Note: Only one of the providers will be active, and rest others will be standby.
If you select your storage providers and look into storage System details section, it will tell you that it is providing support for policy based management profile.
No Once you create storage providers, you can go ahead with creating storage policies
Before Proceeding with creation of new Storage Policies, lets understand the capabilities offered by vSAN first:
vSAN Storage Capabilities
vSAN storage capabilities can be divided into 5 major categories:
Number of failures to tolerate – This option allows admins to configure the number of failures to tolerate. A failure can be network, disk failure or host failure within the vSAN cluster. This value is important when design for the resiliency of your cluster.
Number of disk stripes per object – When designing for the performance of a specific VM or group of VMs you can determine if you need to allow for additional capacity by striping the data across additional disk spindles. By default the value is a single spindle. If a read or write cannot be handled from cache it will resort to the spindle, by using more than one it can increase performance as needed.
Flash read cache reservation – There is the option to explicitly reserve an amount of flash capacity on the SSD for read cache on a per object basis. This is configured as a percentage of the virtual machine disk.
Object space reservation – You can also reserve a percentage of the VM disk space on the hard drives during provisioning. This would be similar to thick provisioning on a standard datastore.
Force provisioning – If a policy is created with any of previous options and it vSAN cannot provide the service, this option will forcefully provision the VM. If the resources become available at a later time, vSAN will attempt to bring the VM back into compliance.
Let’s jump into creating storage policy now.
1: To create Storage Policies, navigate to vCenter Server home screen and click on VM Storage Policies
On the VM storage Policy page click on icon to create a new policy.
On the Create New VM Storage Policy wizard page, provide a name and description for the policy and hit next.
Next is to create Rule Set.
In this example we are going to create a policy for high availability of a VM.
Click on <Add Rule> and select Number of failures to tolerate
Number of Failures to Tolerate indicates resiliency against host, network, or disk failures in the cluster. Increasing this number will cause VSAN to create copies of the object on additional hosts, up to 4 copies total that would allow for three concurrent failures without data loss
Click on Next to continue.
Select the compatible datastore from the list and hit Next.
On Ready to complete page, review your settings and hit Finish to close the wizard.
Select the newly created policy and click on Summary tab, you will see its shows 0 Non-Compliant VM’s, 0 Complaint VM’s and 0 unknown VM’s. This is because we have not applied this policy to any VM yet
Now since our policy has been created, let’s apply this policy to one of the VM.
To apply storage policy to the VM, select the VM and right click on it and select VM Policies > Edit VM Storage Policies
Change the VM storage policy from Datastore Default to one which your created (Tier-1 in our example) and hit OK
If you go to VM Storage Policies again and click on summary page, it will tell you the VM to which you applied the storage profile is compliant or not. IF you are seeing a non-complaint VM it means vSAN doesn’t support the capabilities defined by you in the storage profile.
I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing. Be sociable