With this release, we now have the ability to interface with the vSphere Storage Policy Manager through the addition of the new VMware.VimAutomation.Storage snap-in. This snap-in provides PowerCLI cmdlets that let you manage vSphere policy-based storage from the PowerCLI command line or by automating through PowerCLI scripting.
In this blog series we will look to provide indepth coverage along with real-world scripting examples for each of the cmdlets. All scripts provided will be examples only and unsupported however I do validate each script with great scrutiny in multiple testing environments so you may not require much adaptation, if any, if you choose to leverage them in your own environments. As always, please ensure all coding is validated in a non-production environment prior to production deployment.
Storage Policy Based Management (SPBM)
Storage Policy Based Management (SPBM) is the foundation of the SDS Control Plane and enables vSphere administrators to over come upfront storage provisioning challenges, such as capacity planning, differentiated service levels and managing capacity headroom. Through defining standard storage Profiles, SPBM optimizes the virtual machine provisioning process by provisioning datastores at scale and eliminating the need to provision virtual machines on a case-by-case basis. PowerCLI, VMware vCloud Automation Center, vSphere API, Open Stack and other applications can leverage the vSphere Storage Policy Based Management API to automate storage management operations for the Software-Defined Storage infrastructure.
For more information on VMware’s vSphere Software Policy Based Management see this recent article. More information on the Software-Defined Data Center and its related components can be found at the VMware SDDC product pages.
The new PowerCLI Storage Profile Based Management cmdlets
Below you will find a listing of the new SPBM cmdlets categorized by function as well as the vSphere user-defined storage capability “tags”:
|SPBM Cmdlets||Tag-based Cmdlets|
|Spbm Capabilities and Compatible Storage||Get-SpbmCapability||TagAssignment||New-TagAssignment|
|Policy Backup and Migration||Import-SpbmStoragePolicy|
For more information on vSphere User Defined Tags take a look at the vSphere 5.5 product documentation and the vSphere PowerCLI Documentation. Here is a superb blog article with practical examples of using vSphere storage tags by Dimitar Barfonchovski of the VMware PowerCLI team: VMware PowerCLI Blog: Using vSphere Tags with PowerCLI.
Here is a quick sampling of upcoming articles in this blog series:
- Creating a vm storage policy
- Avoiding storage resync storms
- Service Level (SLA) Compliance Status Reporting
- Service Level (SLA) Remediation
- SPBM Policy backup and migration
- Customized Storage Reports
I would also like to extend an invitation to you our readers. If you have any specific areas of interest that you would like to have covered in this series, email them on over to me directly at firstname.lastname@example.org. I will be collecting the 5 most popular requests and including them as future topics in this series.
If you are at VMworld 2014 Europe in Barcelona this week, you can find me at the VMware Software-Defined Storage booth. You should come by, introduce yourselves and share how you are leveraging vSphere PowerCLI to automate your data center operations.
Here is a great tip brought to you by our friends at the VMware Hands on Labs. If you would like an excellent shortcut to getting “hands on” with the new vSphere Power CLI cmdlets, you should definitely try out this lab:
HOL-SDC-1427 – VMware Software Defined Storage: Module 5: Advanced Software Defined Storage With SPBM and PowerCLI (30 minutes)
As you can no doubt already see, with the release of VMware vSphere PowerCLI 5.8, there are a host of possibilities for workflow optimization, integration and automation available through the new vSphere PowerCLI Storage Policy Based Management cmdlets. Whether you are new to leveraging PowerCLI or have been scripting for years, come along and join us on the fun as we explore and demonstrate real-world scripting for VMware vSphere Storage Policy Based Management with the new PowerCLI 5.8!