VMware {code} Community
jtokach
Contributor
Contributor

Advice on Data Gathering Project

Hi,

We are looking to capture vCenter/ESXi information into a system management and planning database. Some of the information we're looking for:

Clusters in a data center

Hosts in a cluster

VMs in a resource pool/cluster/datastore

Datastore allocation and properties

Resource pool assets and properties

We're want to know the simplest method (and which SDK) to gather this data: VBScript+COM, PowerCLI, .NET managed or directly query the vCenter DB views?

The solution must be able to capture all of the data and more. Existing and example code would heavily sway us one way or another. At first glance, PowerCLI seems to meet the requirements.

Thanks,

Jim

0 Kudos
1 Reply
stumpr
Virtuoso
Virtuoso

I would recommend PowerCLI or Perl depending on your environment, skills and project integration points.

I wouldn't recommend going against the VC DB directly, you'll have to do lot of query building for table joins.  But most of the inventory relationships are exposed as direct properties on the entity itself.  If not, you can chase down child entities easily enough.

The VMware vSphere SDK is pretty robust.  You likely won't run into many properties or values you can't pull directly.  Even the scripting toolkits have full access, though PowerCLI and Perl obscure most of the more complex property retrievals into something simpler to quickly script.

There is a lot of example code in both PowerCLI and Perl that can be leveraged towards your goals as well.  vGhetto (by William Lam) and the community forums have full scripts and examples over the years.

Reuben Stump | http://www.virtuin.com | @ReubenStump