whichClusterIsMyVMIn.pl - Find which Cluster your VM is part of (requires vCenter)

Version 2

    This scripts allows you to find out which Cluster a given VM is part of.

     

    Requirements

    vCenter 2.5.x or 4.x

    ESX(i) 3.5.x or 4.x

    VI Perl Toolkit or vSphere SDK for Perl

     

    Sample execution

     

    [vi-admin@scofield ~]$ ./whichClusterIsMyVMIn.pl --server reflex.primp-industries.com --username primp --vmname simplejack.primp-industries.com
    
    Located VM: "simplejack.primp-industries.com"!
    VM: "simplejack.primp-industries.com" is hosted on "himalaya.primp-industries.com"
    VM: "simplejack.primp-industries.com" is located on Cluster: "PrimpESX-cluster"