Find ESXI host from within guest

leadtheway
leadtheway used Ask the Experts™
on
So a weird situation, theres a machine that we have that noone know where its at.  I can confirm its a vm by decoding the MAC on the Nic that says its vmware plus vmtools.  However, it doesn't show up in vcenter, my only thought is possible it's windows name differs from the name in vcenter or possibly sitting on a standalone esxi host somewhere.  We are running mix of 5.5 and 6.0.  Is there a way within the guest to determine which host it resides on?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
open http://yourESXaddress and check out the api For a quick export that you could parse by script use your script to pull the contents of http://ESXIPAddress/mob/ which lists the resources managed by that ESX host

Also
vmtoolsd.exe --cmd "info-get guestinfo.hypervisor.hostname"

check below link

http://www.virtuallyghetto.com/2011/01/how-to-extract-host-information-from.html

Author

Commented:
yeah i saw that article...it's old.. neither option works...the links don't open anything, and the vmtoolsd  command says no value found
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Have you checked which MAC Address, is located on the physical switch, and then running back to the host.

Also you checked RV Tools just to dump ALL MAC Addresses into a spreadsheet, and searching.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
thats the thing, I have no idea which host it's on so i don't know where its plugged into..i was hoping there was something i could do from the guest to help me determine.  I'm not familiar with RV tools...I guess you're saying use it to pull all the macs and compare with the guest in case it has a different name in vcenter?
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Correct use RV Tools it's simple check if the Mac is known to vCenter because we have seen Mac addresses which have never been found!

Surely you can get networking to find the MAC address on the physical switch port which will then narrow down to a Host

Unless you have automated DR
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Can you also find it's IP address and check DNS or use IMAP to find out if it's Windows or Linux

Do you have MAC address changes allowed or Mac forged transmits allowed?

Do you know if it's a VM or just a virtual interface used by a host?
I think you best bet as other have mentioned is to work with your Networking team so they can isolate which port the MAC address is coming from on your core or upstream switch and hopefully point you in the right direction from there.

Author

Commented:
we have about 30 switches in the environment, thats not an easy task...but i know the mac of the virtual machine, so if i can compare it to what vcenter knows that should get me there
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
If you do not find a correlation between MAC Address you have (do you know it is a Virtual Machine, or just making an assumption because it has a VMware MAC Address ?)

because @compdigit44 raised a similar question on EE, but I don't believe he ever found it...and also remember VMware uses VMware MAC Addresses for virtual switches, virtual VMKernel Portgroups, and many other VMware vSphere interconnects, which all start 00:50:00!

So it may not be a virtual machine.

Author

Commented:
yeah i couldn't find correlation, but it does have VMtools installed.. and yeah it starts with 00:50
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
How do you know the Virtual Machine has VMware Tools installed, but you don't know what the VM is, or where ?

Author

Commented:
because i can RDP to it..and can see the vmtools installed

Author

Commented:
tracked the MAC down on a switch and found the host plugged into that port and finally located
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Great stuff do you know why MAC address differed to what was in vCenter?

Author

Commented:
well i don't think it differed, the issue was it was on a host not associated with the vcenter i was looking at, thats what led me down this path knowing there was a standalone host somewhere.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
ah! okay, I understand....

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial