VMware vSphere 7 storage policies are essential to VM provisioning via Storage Policy Based Management (SPBM) and usually determine which datastores with what functions and specifications will be used. VMware vSphere 7 allows several VM storage policies types that can be used.
This post covers Objective 1.3.3 of VMware 2V0-21.20 Exam Preparation Guide where we’ll learn about the different storage policies that can be used to define which datastores to use when placing virtual machines disk.
VMware vSphere 7 storage policies are a mechanism that assigns characteristics of your storage to the VM that might need high-performance storage with better DR capabilities. Normally, storage policies allow you to place VMs according to the installed and configured datastores in your virtual environment.
VMware vSphere Storage Policies
Storage policies in VMware vSphere 7 can be used to define which datastores to use when placing virtual machines disk. The following storage policies can be created in VMware vSphere 7:
VM storage policies for host-based data services
These storage policies are rules for services offered by the ESXi hosts, such as encryption, compression, and Storage I/O Control.
VM storage policies for vVols
These storage policies allow you to set rules for VMs that apply to vVols datastores and can include storage devices that are replicated for disaster recovery purposes or have specific performance characteristics.
VM storage policies for tag-based placement
Custom policies can also be created for VMs and custom tags for storage devices helpful for storage arrays that do not support VASA and whose storage characteristics are not visible to the vSphere client.
Read More: VMware vSphere 7: Explain the Importance of Advanced Storage Configuration (VASA, VAAI, etc.)
How to Create a Storage Policy?
To define the VM storage policy in the vSphere Client, use the Create VM Storage Policy wizard. For this, Open the Create VM Storage Policy wizard. Click Menu > Policies and Profiles > VM Storage Policies.
Click Create, enter the name, description of the policy, and click Next.
In Policy Structure, you can create:
Host Based Services
You can enable these storage policies by “Enable host based rules”. You can create rules for data services provided by hosts. Available data services could include encryption, I/O control, caching, etc. Host based services will be applied in addition to any datastore-specific rules.
Datastore Specific Rules
You can create rules for a specific storage type to configure data services provided by the datastores. The rules will be applied when VMs are placed on the specific storage type.
These rules can be enabled using “Enable rules for “vSAN” storage”, “Enable rules for “vSANDirect” storage”, and “Enable tag based placement rules”.
Then, you can create an Encryption and Storage I/O Control (SIOC) based policy.
Now, specify rules for vSAN such as availability, storage rules, advanced policy rules, and tags.
Add tag rules to filter datastores to be used for placement of VMs.
Then, check storage compatibility, review the settings, and click Finish.
Storage Policy Based Management (SPBM)
SPBM allows you to define a required policy for a VM, such as requiring fast storage and can then use VASA or define storage tags manually, and a VM can only be placed on a storage device that is matching the requirements defined in the created policy.
Read More: VMware vSphere 8 Is Now GA (General Availability)
Virtual Disk Types
Virtual Disk Types in VMware vSphere is a common topic and I’m not going to deep dive into it. But, the said topic is a part of the VMware 2V0-21.20 Exam Preparation Guide, so, I’ll briefly describe them. Creating a virtual disk, allows you to determine how you are going to allocate space to that virtual disk for a VM. The mechanism that is adapted to allocate a virtual disk to a VM is through writing zeros, and this process is typically referred to as zeroing out the file. For example, if you’re interested to create a 40 GB virtual disk and allocate all of the space to a VM, a VMDK file will be created, and 40 GB worth of zeros are written to that file. The following are the virtual disk types normally used in allocating virtual disk space to the VM(s):
Eager zeroed thick: The disk space is allocated for the virtual disk files and erased (zeroed out) at the time of creation. If the storage device supports VAAI, this operation will be offloaded to the storage array. Otherwise, the VMkernel writes the zeros, and this process could be slow. This method is the slowest for virtual disk creation but is the best for a guest performance.
Lazy zeroed thick: The disk space is created for the virtual disk files at the time of creation but not zeroed. Each block is zeroed, on-demand at runtime, before being presented to the guest OS for the first time. This increases the time required for disk format operations and software installations in the guest OS.
Thin provisioned: The disk space is on-demand for the virtual disk files and is not allocated or zeroed at the time of creation. It is the fastest method for virtual disk creation but the worst for a guest performance.
vSAN-Specific Storage Policies
We already briefly discussed vSAN Storage Policies during the policy creation wizard. These vSAN storage policies define how VMs are placed and allocated on configured vSAN to meet performance and redundancy requirements. The following are some vSAN Storage Policies:
Primary Level of Failures to Tolerate (PFTT)
This policy is a default policy and defines how many hosts and device failures a VM object can endure. For n failures tolerated, data will be stored in n+1 location and includes parity copies with RAID 5 or 6. The default setting for this policy is 1, and the maximum is 3, and if an ESXi host isn’t in a fault domain, it is considered to be in a single-host fault domain.
Secondary Level of Failures to Tolerate (SFTT)
This policy is used in stretched clusters and defines how many additional host failures can be tolerated after a site failure. If PFTT = 1, SFTT = 2, and one site are unreachable, two more host failures can be tolerated in a cluster. The default setting for this policy is 1, and the maximum is 3.
Data locality
This option is available when PFTT=0 and the options for this policy are None, Preferred, and Secondary. It allows objects to be limited to one site or one host in stretched clusters, and the default setting for this policy is None.
Failure Tolerance Method
This policy defines whether the data replication mechanism is optimized for performance or capacity. If RAID-1 (Mirroring)— Performance is selected, there will be more space consumed in the object placement but better performance for accessing the space. If RAID-5/6 (Erasure Coding)—Capacity is selected, there will be less disk utilization, but performance will be reduced.
Number of disk stripes per object
This policy determines the number of capacity devices where each VM object replica is striped. Setting this above 1 can improve performance but consumes more resources. The default setting for this policy is 1, and the maximum is 12.
Flash Read cache reservation
This policy defines the amount of flash capacity that is reserved for reading caching of VM objects. It is defined as a percentage of the size of the VMDK and is supported only in hybrid vSAN clusters. The default setting for this policy is 0%, and the maximum is 100%.
Force Provisioning
This policy forces provisioning of objects, even when policies cannot be met. The default setting for this policy is No.
Object Space Reservation
This policy defines the percentage of VMDK objects and it must be thick provisioned on virtual infrastructure.
Disable Object Checksum
A checksum is used in validating the integrity of the data and in the event of a mismatch, incorrect data is overwritten. If this policy is set to Yes, a checksum is not calculated. The default setting for this policy is No.
IOPS Limit for Object
This policy sets a limit for the IOPS of an object and if set to 0, there is no limit.
Read More: VMware vSphere 7 Advanced Features
Conclusion
VMware vSphere Storage policies allow the assignment of characteristics of storage to your VM. These storage policies can be created when your VMs might need faster storage, better performance with better DR capabilities in the virtual infrastructure. Typically, storage policies allow administrators to specify where to place VMs according to the types of configured datastores in your virtual environment.
Sources