Check virtual hardware support for a cluster

Here is yet another quick little action for you.

So I was doing some maintenance on my virtual hardware upgrade workflow and realized that I needed to check which hardware versions the cluster supported so that I’d know which version to upgrade to.

After digging through the API and doing some testing I found something that seems to do what I wanted.

So several object types have a property called EnvironmentBrowser, which in turn has a method called QueryConfigOption.

QueryConfigOption lets you pass in a key (in this case “vmx-08″, etc.) and an optional host to further limit the scope. I decided to just go with the cluster in this case but depending on your use-case you may want to include the host object as well.

The action itself is short and sweet:

Please note that this will throw an exception if there are no hosts in the cluster.

The usage is just as simple:

I have not done extensive testing, so if you know of any cases where this won’t work or if you have any suggestions please leave me a comment.

And as always you can download the package here.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">