Version 1

    In this article,  we can see an overview of how to uniquely identify a virtual machine in a vSphere vCenter (VC) and/or vCloud Director (vCD) environment.


    This script will help extract the information needed to uniquely identify a virtual machine in vSphere vCenter (VC). For vCloud Director related information, please to part 2 of the article.


    To run the script you will need to have VMware vCLI installed on either a Windows/Linux system or you can use the VMware vMA appliance.


    Here is an example execution with output:


    $ ./vmMoRefFinder.pl --server westcoast-vcenter --username root --name MyVM1
    Name: MyVM1
    VM MoRe: vm-14
    VM InstanceUUID: 501b8bde-95da-472a-4d2d-9d97ea394bbc
    vCenter Name: westcoast-vcenter
    vCenter InstanceUUID: 9B6C7A60-C60F-4C1D-A607-0A0CFA2C2D5A