Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Finding hosts connected to datastore clusters

$
0
0

Is there a way to determine the hosts connected to a datastore cluster?

 

I found I can return the datastore clusters in vcenter by using the following:

 

var datastoreClusters = Server.findAllForType("Vc:StoragePod", null);

 

The problem is if I’m deploying to a cluster with only regular datastores for example, that piece of code returns the datastore cluster as a valid option when it isn’t since. I have already selected a host to deploy my vm to by this point in my workflow, so if I could determine what hosts are connected to the datastore cluster, I could eliminate it as an option.

 

So… anyone know how to find the hosts connected to a datastore cluster?

 

(I think the best option is to select datastore objects and datastore cluster objects connected to a given host though. I couldn’t figure it out so in the case of regular datastores, I just get all datastores and then loop though the results to see if it’s connected to my host. Probably not the most efficient way but it seems to work)

 

Thanks


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>