VMware Cloud Community
DawidM
Contributor
Contributor

ESX/ Virtual Center - VM's MAC address

Hello All!

I would like to ask if it possible to find Virtual Machine's name by knowing it's MAC address only in any way ?

Thanks a lot,

Dawid

Tags (4)
Reply
0 Kudos
8 Replies
firestartah
Virtuoso
Virtuoso

You will need to search the arp tables to compare the mac address to the name

"arp -a" will list everything in the ARP tables... so you might find what you want there.

If you found this information useful, please consider awarding points for "Correct" or "Helpful".

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful". Gregg http://thesaffageek.co.uk
Reply
0 Kudos
DawidM
Contributor
Contributor

Not exactly what I was asking...

Let me clarify .

Does Virtual Center or ESX softwarehave any tool to list all the VMs together with thier MAC addresses? (With IPs it is possbile)

Regards,

Dawid

Reply
0 Kudos
Chuck8773
Hot Shot
Hot Shot

I query the SQL Server directly to pull infoormation for our billing system. You can query the database for this information.

select e.name, n.mac_address, n.network_name

from vpx_vm v

inner join vpx_nic n on (v.id = n.entity_id)

inner join vpx_entity e on (v.id = e.id)

I didn't quickly see how to associate the IP address with the NIC. It may be in there though.

Found it.

select e.name, n.mac_address, n.network_name, i.ip_address

from vpx_vm v

inner join vpx_nic n on (v.id = n.entity_id)

inner join vpx_entity e on (v.id = e.id)

inner join vpx_ip_address i on (i.entity_id = n.entity_id and i.device_id = n.device_id)

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

Charles Killmer, VCP4 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
Reply
0 Kudos
Chuck8773
Hot Shot
Hot Shot

Did this answer your question?

Charles Killmer, VCP

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

Charles Killmer, VCP4 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
Reply
0 Kudos
DawidM
Contributor
Contributor

Hi!

As soon as I ll test this solution I ll rate your answer.

As for now I dont have SQL access.

(I found another solution which is grepping vmx files on ESX datastores)

Regards,

Dawid

Reply
0 Kudos
azn2kew
Champion
Champion

I'm not sure what you're trying to accomplish, but this Virtual Mac Tool might give you some details

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

Regards,

Stefan Nguyen

VMware vExpert 2009

iGeek Systems Inc.

VMware, Citrix, Microsoft Consultant

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
Reply
0 Kudos
jayctd
Hot Shot
Hot Shot

I would note that this is pulling it from the SQL server for Virtual Center (just for reference)

Jered Rassier

##If you have found my post has answered your question or helpful please mark it as such##

##If you have found my post has answered your question or helpful please mark it as such##
Reply
0 Kudos
mattboren
Expert
Expert

Hello, DawidM-

I know that this thread is quite old, but, I thought that I would add a bit of info about finding VMs by a given MAC address.  We recently had a need to do so, and I did not find a sufficient solution elsewhere, so I wrote up a little PowerShell/PowerCLI to handle this.

It took a bit of time to actually get around to writing up the post about it, but I have now done so.  It is posted over at vnugglets.com:

http://vnugglets.com/2011/09/find-vm-by-nic-mac-address-with.html

Enjoy.

Reply
0 Kudos