Daniel's Tech Blog

Cloud Computing, Cloud Native & Kubernetes

SCVMM – Storage Overcommitment PowerShell Script – Version 3.2

Nearly 1000 downloads got my CSV Overcommitment PowerShell script on the TechNet Gallery and again it was time to invest some hours into it.

-> https://gallery.technet.microsoft.com/Discover-Cluster-Shared-859f133c

My main focus was to add support for SMB 3.0 file shares which are managed by VMM. Till version 3.1 the script supported only Cluster Shared Volumes and not SMB 3.0 file shares that become more and more popular through Scale-Out File Server deployments.

During my tests I discovered a very odd situation. When you are using differencing disks, for example the WAP VM role gallery items, and you deleted the base disk on your storage VMM does not customize its database entries. The result was that my script has taken those dead bodies into the overcommitment calculation and that ended up in an inaccuracy of the calculation.

CSVFSOvercommitment03CSVFSOvercommitment04

To get all the disks out of the VMM database I’m using the following line in my script.

Get-SCVirtualHardDisk -All -VMMServer $VMMServer|Sort-Object -Property Location –Unique

So I’m getting also the dead bodies. What now? I fixed this in version 3.2 with an additional test if the disk exists on the storage. But the runtime suffers under the additional testing and that is the reason why the additional testing is optional. You can call the PowerShell function either without the switch –Testing for runtime performance or with the switch –Testing for a better accuracy.

  1. Get-SCStorageOvercommitment –VMMServer localhost
  2. Get-SCStorageOvercommitment –VMMServer localhost –Testing

CSVFSOvercommitment01CSVFSOvercommitment02

You can see the difference in the screenshots above and as you may have discovered I have done minor output changes. I have added two additional columns for the storage type and the additional testing.

After all I’m in the planning phase for version 4.0. Focus is on transferring the current script to a SMA runbook with daily email status reports. Stay tuned!

History:

Version Changes
3.2
  • Added support for SMB 3.0 file shares managed by VMM
  • Added advanced testing mode for a better accuracy
  • Minor output changes
3.1
  • Added support for multiple Hyper-V clusters with the same CSV names
3.0
  • Added support for Shared VHDX
  • Performance improvements
2.0
  • Support for CSV paths from C:ClusterStorageVolume10 and up
  • Support for VMs whose VHDs resides on different CSVs
  • Completely based on the VMM PowerShell Cmdlets
1.0 Initial release
WordPress Cookie Notice by Real Cookie Banner