VMware Cloud Community
segadson
Contributor
Contributor

Virtual Machine Provisioned Storage

Hello,

How can I easily get the storaged provisioned for a VM like you can see in the inventory section of vco (in the general Tab)

Reply
0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee

Hi,

This value is computed as a sum of committed and uncommitted storage space (measured in bytes) for this VM on all datastores.

Here is a sample scripting code:

// Computes VM's provisioned storage in megabytes

var provisionedMB = (vm.summary.storage.committed + vm.summary.storage.uncommitted) / (1024 * 1024);

System.log("Provisioned storage: " + Math.round(provisionedMB));

Reply
0 Kudos