Test-vMotion - Identifying vMotion Issues

We have all had those moments where we wish to place a host in Maintenance mode and the task just hangs at 2%.  Typically you'll find that there is a VM that just will not vMotion automatically for some unknown reason.  This can be maddening, especially in larger environments with multiple cooks in the kitchen.

Instances like this have caused countless admins a great deal of headache and in some cases completely derailed changes or change windows. A few months ago it was my goal to provide a type of audit that could check all the VMs in a cluster and clearly identify any issues that may exist.  This needed to run well in advance to a change or as a scheduled check in the environment.

The function I am providing here uses the CheckMigrate() method and can perform the following checks in its current version:

  • All VMs in a Cluster (Random host or to a specific host)
  • A single VM (Random host or to a specific host)
  • Limited pipeline capability for checking an entire cluster (This will be expanded soon)
  • Ability to turn off all console output so script can be used in console or as scheduled task

Huge thanks to the following folks who contributed and helped validate the function.

  • Hal Rottenberg
  • Alan Renouf
  • Jade Lester
  • Josh Coen

I have several plans for an updated version in 2012 so please share your feedback and usage experiences.  I hope you find it useful as well as hopefully saves you from an extended long evening.

May the -force be with you!

Josh Atwell

http://www.vtesseract.com/

Twitter: Josh_Atwell

Attachments