Find vmware guest using the MAC Address on ESX

With traditional networking, using switches arp tables it always was pretty simple to find a server using only the mac address.

However, with VMWare things changed a little. Virtual Switches dont provide the same level of functionality as current physical switches (unless you spend lots of money)

As far as I know basic VMWare switches dont have a command to tell you the arp table and the associated hosts / port.

So what can you do if you get for example an IP address conflict where you only know the mac address of the conflicting host?

Well, I found a superb script which interrogates an ESX host and lists the guest name, alongside the MAC address.

Its as follows – for ease create a shell script and paste the below in.

When you run it you will get output like this:

displayName = “win2k8server2”
ethernet0.generatedAddress = “00:50:56:97:20:dd”

displayName = “win2k8server1”
ethernet0.generatedAddress = “00:50:56:97:31:98”

Script as follows



for COUNT in $(vmware-cmd -l); do
echo `echo $COUNT|awk -F’/’ ‘{print $6}’`
echo ” “`echo $COUNT`
echo ” “`cat $COUNT|grep “displayName”`
#MAC Address may refer to “Address” instead of “generatedAddress”
echo ” “`cat $COUNT|grep “generatedAddress”`



You can follow any responses to this entry through the RSS 2.0 feed.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This blog is kept spam free by WP-SpamFree.