VMware Cloud Community
odohertyd
Contributor
Contributor

SQL Queries for vCentre Database

Hi,

I'm trying to put together a sql query that will return all VM's in our inventory with certain information and 3 or more custom attributes.

I can get a query to return v.NAME, v.IP_ADDRESS, v.MEM_SIZE_MB, v.NUM_VCPU, v.GUEST_OS, v.DESCRIPTION however I would also like the amount of storage space the VM uses as well as my custom attriubutes to appear.

Example.JPG

Can anyone help please?

0 Kudos
2 Replies
brunofernandez1

if you are familiar with powershell i would recommend to use PowerCLI from VMWare

It's quiet easier to find your needed information's

------------------------------------------------------------------------------- If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons) Regards from Switzerland, B. Fernandez http://vpxa.info/
0 Kudos
odohertyd
Contributor
Contributor

This is for a weekly automatic report which I have setup to run to sharepoint. I have it working for the few fields specified just not sure how to write the query to include the custom attributes and VM capacity used for the datastore.

Thanks

0 Kudos