Hugo Peeters over at PeetersOnline.nl created a really cool PowerShell script which checks how much disk space youâre wasting inside your VMâs but also on your VMFS. Iâm going to edit my PowerShell presentation (the one for next Friday) for the last :-) time and try to fit in a page with this script.
Using VMware seriously requires a lot of (shared) storage. This kind of storage (on a SAN for instance) is quite expensive. So you might want to check if you are wasting a lot of this space. When you look at the storage in VMware, it consists of multiple abstraction layers. A virtual machine has one or more Logical Disks, which are indicated by driveletters. You can use WMI to determine the amount of used and free space (Win32_LogicalDisk). One or more logical disks are contained in a partition. One or more partitions reside on a physical disk. That physical disk is really a virtual disk, a vmdk file to be precise. One or more vmdk files reside in a Datastore, which can be found on a LUN on your SAN.