Discover storage overcommitment on Hyper-V Cluster

This PowerShell script discovers a CSV overcommitment in the specified Hyper-V cluster. It calculates it for all CSV volumes that are visible to the Hyper-V cluster. PowerShell 3.0 and SC2012 SP1 VMM cmdlets or higher are required.

 
 
 
 
 
4 Star
(2)
2,048 times
Add to favorites
System Center
9/17/2015
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • 2008r2 Cluster and VMM 2012r2
    2 Posts | Last post January 31, 2017
    • How can I get the script to report on my 2008r2 cluster? It does fine for my 2012r2 clusters but 2008r2 it does not parse out the volumes correctly.
    • Hi EDKnet,
      
      the script uses the information out of SCVMM 2012 SP1/R2. Because I have no 2008 R2 cluster, I can not validate it. But when the volume information is not correct, then it has something to do with the information that are stored in SCVMM and not with the script itself. 
  • No output
    2 Posts | Last post June 10, 2015
    • Hello
      I tried running your script in our environment. Win2012R2, SCVMM 2012R2 rollup6 but the script gives no output. I have checked execution policy, started VMM's powershell etc.
      
      .\Get-SCStorageOvercommitment -VMMServer "our-VMM-server"
    • The script is written as a PowerShell function. For more details on how to execute a PowerShell function have a look at the following blog posts.
      
      -> http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/09/how-do-i-use-a-windows-powershell-script-containing-functions.aspx
      -> http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/10/how-to-reuse-windows-powershell-functions-in-scripts.aspx
  • One of your methords returns Bits instead of Bytes
    3 Posts | Last post November 18, 2014
    • $VHD.MaximumSize returns bits 
      
      Therefore 
      
      OvercommitedPercentage=((($OvercommitSpace/8GB)/($CSVInfo.Capacity/1GB))*100)-100
      
      and 
      
      @{Label="Effective Used(GB)";Expression={"{0:N2}" -f ($_.Overcommitment/8GB)}}
    • Thanks for the feedback!
    • My code is correct. Because both values $VHD.MaximumSize and $CSVInfo.Capacity are UInt64. If I'm using your suggested code the end results don't reflect the real values.