We have already discussed about creating storage policy with storage type VSAN and in this post we are explaining create storage policy using “TAGS” . Here we are share the procedure to create policy using TAG with VSAN and iSCSI datastore.
About Add or Edit Tag-Based Rules
While you create or edit a storage policy for virtual machines, you can create or modify a rule that references tags that you used for particular datastore and the datastore become compatible with that type of storage policy.To create policy with Tag first you need a storage tags and apply them to datastore’s .
You can add tag-based rules to a rule set that includes storage-specific rules, or create a separate rule set with only tag-based rules. follow below rules while you use tags in the policies
If the rule set contains other storage-specific rules, the datastore with the assigned tag must satisfy all of the rules in the rule set.
If you add several tags from the same category within the same rule, the tags are treated as alternative constraints. Either of the tags can be satisfied.
If you add the tags in separate rules within the same rule set, all tags must be satisfied.
First we will create tag and assign that tag to a iSCSI storage
Log into your vSphere Web Client with an Administrative account
From the Home screen Click on the Home Icon and select Tags and Custom Attribute icon
Select on the Tags and Select the Create New Tag Button as shown in below image to create a Tag which can be used for SPBM
Provide a Tag Name and Description , As we are going create Tag which will be used for ISCSI and VSAN will name as
” ISCI+VSAN ”
Since we are creating the Tag First time we have assign this Tag to Category , here no Category available so we are going to create new Category form same menu
Provide a Category NAme and and Description and Choose the Associated Object type also .
Note : We can Assign the Category for One Tag per Object or May Tag per Object also by default All Object will be selected .
Since We Create Tag for Datastore will untick the default option “All Objects and Select Object as ” Data store ” and Click OK
Also you can verify the Category from the Category Tab from Same Window.
Next we will assign the Tag to the datastore by Right Click on the Datastore and select Assign tag
Here First we select iSCSI Datatstore ( TEST-ISCSI)
select the Tag – ISCSI+VSAN we created and Click on Assign
Next we will create policy using Tag option
Log into your vSphere Web Client with an Administrative account
From the Home screen Click the VM Storage Policies icon
In the Right pane under the VM Storage Policies tab Click on Create VM Storage Policy
It will launch new windows , there you have to provide a Name and Description of the policy. Click Next
Review the Policy Structure screen and Click Next to continue
We will not be leveraging the Common Rules for Data Services Provided by Hosts since in this scenario it is not required Click Next to continue
Mark the rule-sets in the storage policy and Select Tag based placement from the dropdown menu and add the required rules from there .
Select the Tags from Category and
Select the Tag from Drop Down menu , here it is VSAN ISCSI and click on the Add Tags
It will prompt a window to list the Tag we created , here ISCSI+VSAN select the tag and click OK
You can See the Tag will show over there , as shown in below image Click Next to Continue
From the Storage Compatibility screen, you can view iSCSI Datastore is listed and Click Next to continue:
And Finally review the settings from the window and Click Finish
Next we will check how can we add VSAN Datastore to the Same Tag and Check the Compatibility
As we mentioned above procedure we have assign the tag to VSAN datastore
Navigate to the Datastore menu from vCenter and Right Click on the desired Datastore – > Tags & Custom Attributes -> Assign Tags
Select the Tag and Click Assign
Next Lets verify the compatibility of the datastore on the Policy we already created
Navigate to VM Storage Policies and click on the desired policy and click on Edit Setting , here it is VSAN ISCSI
Click on the Storage Comparability Option , You can see that Newly Added VSAN datastore also listing there .
We can also combine Tag based and Datastore type while creating the storage policy ( SPBM )