Avatar of leadtheway
leadtheway
Flag for United States of America asked on

Find ESXI host from within guest

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?
VMware

Avatar of undefined
Last Comment
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

8/22/2022 - Mon
aravind anche

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
leadtheway

ASKER
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 PRO / EE Fellow/British Beekeeper)

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.
Your help has saved me hundreds of hours of internet surfing.
fblack61
leadtheway

ASKER
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 PRO / EE Fellow/British Beekeeper)

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 PRO / EE Fellow/British Beekeeper)

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?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
compdigit44

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.
leadtheway

ASKER
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
ASKER CERTIFIED SOLUTION
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
leadtheway

ASKER
yeah i couldn't find correlation, but it does have VMtools installed.. and yeah it starts with 00:50
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

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

ASKER
because i can RDP to it..and can see the vmtools installed
leadtheway

ASKER
tracked the MAC down on a switch and found the host plugged into that port and finally located
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

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

ASKER
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 PRO / EE Fellow/British Beekeeper)

ah! okay, I understand....
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck