VMware vSphere

 View Only
  • 1.  How to find a VM through MAC only

    Posted Jul 10, 2013 05:33 PM

    WE have a VM machine, only know the MAC and host name is gone.

    How to find this VM machine by MAC only?

    Please help.



  • 2.  RE: How to find a VM through MAC only



  • 3.  RE: How to find a VM through MAC only

    Posted Jul 10, 2013 05:46 PM

    Did anyone try this link? Was it working for you?

    Was it need to be run on windows powershell?



  • 4.  RE: How to find a VM through MAC only

    Posted Jul 10, 2013 05:57 PM

    If you are not specifically looking for a scripted solution, take a look at RVTools (http://www.robware.net/) which give you a complete overview about your environment (including the VMs virtual network adapters/MAC addresses).

    André



  • 5.  RE: How to find a VM through MAC only

    Posted Jul 11, 2013 12:15 AM

    You can run script from both links using powercli

    I have tried script from first link and it worked.

    C:\WINDOWS\system32\windowspowershell\v1.0 powershell.exe -PSConsoleFile  "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vmMac.ps1"  -command "connect-viserver -server <myVCenter> -user <myUser> -password <myPassword>


    $strMacToFind = "00:50:56:83:00:69"

    ## return the .NET View object(s) for the VM(s) with the NIC w/ the given MAC

    Get-View -Viewtype VirtualMachine -Property Name, Config.Hardware.Device | ?{$_.Config.Hardware.Device | ?{($_ -is [VMware.Vim.VirtualEthernetCard]) -and ($_.MacAddress -eq $strMacToFind)}}



  • 6.  RE: How to find a VM through MAC only

    Posted Jul 11, 2013 02:48 AM

    Goto the virtual machine in Hosts & Clusters View in vCenter. Now right click on the list of the columns on your right side. You can search based on the following properties as shown in the screenshot...