kbr5678
Contributor
Contributor

(vSphere) - Vcenter Storage views

Hi..

How to collect the provisioned space and Shared space for each VM ...Via VI SDK..

0 Kudos
1 Reply
lamw
Community Manager
Community Manager

You can get this information by looking at the storageInfo for a given VM MO: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.vm.StorageInfo.html which returns back an array of objects which will specify committed, uncommitted, shared and datastore moref for the storage allcoated/used per VM and its disks across the datastores that its stored on.

Here's a script that shows how to extract these properties:

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos