Posts

Showing posts from November, 2009

VM Storage Balancer

Image
One thing I’ve noticed in vCenter 4.0 is that it now has alarms to monitor datastore sizes and places little ‘warning’ or ‘alert’ icons.  I like it, but it also annoys me because I know I need to do clean up and make sure each of our datastores has a minimum of 20% free space.  So here we are: Move-VMStorageBalance.ps1 Summary: Running this script will attempt to storage vMotion systems in a specified cluster around to datastores that have more than x% of free space before and after the move. Systems with specified DRS rules are omitted by default.  I’ve left some defaults defined in two variables that you will need to change to work for your environment. Requirements: Powershell 2.0 PowerCLI 4.0 vCenter 4.0 or ESX 4.0 Disclaimer/Caveats: Use this script @ your own risk, I take no responsibility for any awesomeness that might occur.  Test, test, and test more. Script may be SLOW as it works against 1 VM at a time. Fast if ...