A handy little tool that was useful for me which might come in handy for others too while working on my VSAN VM Storage Policy recovery article is the SPBM (Storage Policy Based Management) MOB which works similar to the vSphere MOB and FDM MOB for those of you who have used this interface before. The MOB stands for Managed Object Browser and simply put is an interface that allows you to browse the objects and properties of your vSphere environment by just using a web browser. You can also interact with the MOB by executing the same set of vSphere API methods as you would if you were to write a script or application which is useful for quickly getting a sense of what a certain property might look like or the output of an API method without writing a single line of code.
In vSphere 5.5, there is now an SPBM API which is available as a separate API endpoint on the vCenter Server. This new API allows you to manage the full lifecycle of a VM Storage Policy formally known as VM Storage Profiles from a programmatic standpoint which is very important when working with VSAN as everything is policy driven. For more more details about the new SPBM API, please take a look here. As mentioned earlier, one great way to learn about the API is by exploring the MOB and luckily the SPBM API includes one!
To access the SPBM MOB in vSphere 5.5, you will need to point your browser to your vCenter Server as that is where the endpoint is exposed using the following URL format:
http://[VC-IP-OR-HOSTNAME]:8190/mob
To access the SPBM MOB in vSphere 6.0, you will need to point your browser to your vCenter Server as that is where the endpoint is exposed using the following URL format:
http://[VC-IP-OR-HOSTNAME]/pbm/mob
Sun Dry says
I've been renting a unit here for quite some time and I love this place (never thought I'd say that about a storage place, but there it is!). I've rented other spaces in years past, but the service and location here just can not be beat!
Self storage in Brendale
Scott Laplante says
Is the SPBM URL you mentioned here accurate? Ive been attempting to access it using http://[VC-IP-OR-HOSTNAME]:8190/mob with no luck. However, i was able to access the SPBM mob by going to http://[VC-IP-OR-HOSTNAME]/pbm/mob. If anyone else is having issues, this is the URL that worked for me!
William Lam says
/pbm/mob is for vSphere 6.0 this article was written for vSphere 5.5
Scott Laplante says
That would explain it. I see you updated the article with the 6.0 url, thanks for the info.
kiran says
I know this is old article, but does the datastores also shown up in the associated entites? (Ex: vsan datastore where there is default associated storage policy)
kedar says
Can you please create a sample script to access spbm API's in perl. It would be a great help.
I am new to perl and not sure how to save the cookie and use it. I am stuck due to it.
Pavan says
Thank You Mr William Lam, this article is so useful and informative. I tried the steps mentioned in the article and I was facing issue with "PbmQueryAssociatedEntity". It is not returning any data. Could you please help me fixing this issue?
Request::
a9423670-7455-11e8-adc0-fa7ae01bbebc
Response::
NAME TYPE VALUE
-------------------------------------------------------------------------------------------------------
dynamicProperty ArrayOfDynamicProperty Unset
dynamicType string Unset
name string Return value
val anyType
-------------------------------------------------------------------------------------------------------
Thanks in advance.
Regards
Pavan Kumar K