I was looking to find the storage growth rate in my environment when I noticed something interesting. When I query the VMs and the Datastores on provisioned space I get different numbers where I would expect the numbers to be equal. In my environment it looks like the space provisioned by adding each VM is 185 TB and by adding each datastore is 172 TB. I was wondering if anyone could explain the difference here. I am including the script that I used to get the figures.
$provisionedgb=0
$provisioned=0
$VMs=Get-VM
$stores=Get-Datastore
foreach($VMin$VMs) {
$provisioned+=$VM.ProvisionedSpaceGB
}
$provisioned=$provisioned/1024
foreach ($storein$stores){
$provisionedgb+=$store.provisionedGB
}
$provisionedgb=$provisionedgb/1024
Write-Host"VM Provisioined (TB) $provisioned"
Write-Host"Datastore Provisioned (TB) $provisionedgb"