
Using Storage Policies in VMware vSphere
On VMware, One way to be able to catalog our storage is by using Storage policies. With them, among other things, We can initially create tags to tag our datastores, and then create storage policies based on certain conditions that the datastores meet. With this, we will be able to stop worrying about where we store the virtual machines individually and we will try to manage them based on their criticality, yield…
We will use the 6.5 vSphere, we will do it from our vCenter Server. In this case we will make a very simple example to understand, We're going to create policies that allow us to choose a storage type when deploying VMs or moving them from Datastore. Let's do the typical example of cataloging machines as Platinum, Gold or Silver, Yes? And so the VMs that are Platinum will be stored in datastores that are provided by fast disks or RAIDs that do not penalize, and so we are downgrading to Gold for MVs that perhaps need normal performance and those we assign in Silver will go on slow disk and perhaps with RAIDs that penalize performance, Well, this will depend on their environment!
If we go to the Home view > Custom tags and attributes, in the "Categories" tab we are going to create a couple of categories, which will be the ones to which we associate the tags that we will now create.
A very typical name will be "Disc Type", we indicate that it will have many tags per object and we mark where we want to apply this Category, which will be in "Data warehouse" and optionally in "Data warehouse cluster". Accept,
Now let's create the tags for this Category, click on the "Tags" tab,
And we register as many labels as we need, For example, for the 'Disc Type' Category we can create these tags: SSD, SAS, SATA...
Continuing with this example, we will then create another Category called "RAID Type" and we will create some tags that are RAID0, RAID5, RAID10...
¿Yes? We follow!
Now what we have left is nothing more than to associate the tags that interest us with the different types of Datastores that we have, about the "Datastores" view, select one and in the "Summary" tab we will have the Labels below, all you have to do is click on "Assign...",
All the tags that we will have created will come out, We select the ones that meet the conditions. Let's assume that the datastore is the one I just chose, it is stored on SAS-type magnetic disks and also at the cabin level there is a RAID of type 5, we associate them and click on "Assign",
Once all datastores have been tagged, Let's finally create a directive, Let's go "Home" > "VM Storage Policies" > "Storage policies".
From here we can click on "Create virtual machine storage policy",
And in the wizard that will launch us, we select the name of each Directive, following the same example, Create 3 Different Directives, Platinum calls, Gold and Silver. Let's take the example of Silver's,
“Following”,
We check if we want any common rules to apply, "Next",
GOOD, what we will have to do is create the conditions that interest us, in this case to be a storage policy of type 'Silver', what I will associate with this rule will be the SAS tags for disks and in the case of RAID then RAID10 and RAID5. Since the Platinum will go with SSD, Gold with SATA and RAID5...
If we follow the wizard, we will therefore see the Datastores that are compatible with the conditions we have just indicated, we will see the total capacities, etc... If we agree, we continue with "Next",
And if we are satisfied we end the wizard with "Finish",
We will be able to deploy a new VM or edit an existing one, associate it with a storage policy, being able to choose in this case the 'Platinum' and it will tell us which datastores are compatible and thus we can host the VM on fast disk, In this case! And so we don't care about something else! I hope it is of interest to you!