Automation

 View Only
  • 1.  What does ProvisionedSpaceGB Include?

    Posted Mar 23, 2017 10:12 PM

    Can anyone tell me if provisionedSpaceGB in powerCLi includes space for all virtual machine files such as swap files and page files?

    Thanks!



  • 2.  RE: What does ProvisionedSpaceGB Include?

    Posted Mar 24, 2017 06:23 AM

    Afaik, yes, this includes all files.

    You can do the following, it will show three values.

    In case of Thin Disks you can see a difference between Provisioned and Used.

    The calculated property FileTotal, takes the actual size of each file (including .vswp), and summaries.
    You'll notice that UsedSpaceGB and FileTotal are more or less the same value (small difference might exists due to rounding).

    Get-VM |

    Select Name,ProvisionedSpaceGB,UsedSpaceGB,

        @{N='FileTotal';E={($_.ExtensionData.LayoutEx.File | Measure-Object -Property Size -Sum).Sum/1GB}}



  • 3.  RE: What does ProvisionedSpaceGB Include?

    Posted Apr 04, 2017 06:47 PM

    OK thanks - during times when a VM is running, the size of the swap file may increase or decrease.  Does this mean that "provisionedspaceGB" will also rise and fall as the swap file size increases and decreases during use?



  • 4.  RE: What does ProvisionedSpaceGB Include?

    Posted Apr 04, 2017 06:50 PM

    Afaik, the swap space is not included in this number.



  • 5.  RE: What does ProvisionedSpaceGB Include?

    Posted Apr 04, 2017 07:13 PM

    OK thanks - it looks like I still may be a bit unclear then how to solve my problem.  Basically I have a lot of VMs with big swap and page files that take up space on datstores.  If the sum of all these page and swap files is a very large amount of space, I need to account for that.

    The problem is that if I just take usedspaceGB or provisionedspaceGB using powerCLI, I'm not sure that I'm really accounting for how much total space might actually be needed to account for large swap and page files that might grow while VMs are powered on and having data written to swap / page.

    Does this make sense and is there a surefire way to report on page and swap file size using PowerCLI?

    Thanks!



  • 6.  RE: What does ProvisionedSpaceGB Include?

    Posted Apr 04, 2017 07:41 PM

    You could look at the each of the individual files that constitute a VM.

    I did something like that in my Yadr – A Vdisk Reporter post.

    In it's current form the script looks at all VMs, but it shouldn't be too hard to only look at a specific set of VM, or at all the VM on a specific datastore.



  • 7.  RE: What does ProvisionedSpaceGB Include?

    Posted Oct 26, 2021 01:54 AM

    Swap file sizes do not change. They are based on Memory allocated minus memory reserved.

     

    I believe you are referring to snapshots that change.

     

    I do not know if swap files are counted in ProvisionedSpaceGB.