VMware Cloud Community
sunvmman
Enthusiast
Enthusiast

how to tell which esx server a vm is running on

Is there anyway to know by logging into a gues os which esx server is hosting it ?

0 Kudos
5 Replies
Texiwill
Leadership
Leadership

Hello,

You can not tell from within the Guest OS. You can tell by using the VI Toolkit however.


Best regards,
Edward L. Haletky
VMware Communities User Moderator, VMware vExpert 2009
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
lamw
Community Manager
Community Manager

As Edward stated, it's a no. Though you do have few options, you can quickly write up a shell script to SSH to each of your ESX host(s) and if you use SSH keys, this can speed up the login/check process. You can then do something like a vmware-cmd -l and assuming you keep the same naming structure of the VM name to the VM configuration file, then you can do a quick search. You also have the option of using VI Perl Toolkit and there is equilv. of vmware-cmd as well, along with that, you also have a utility called vminfo.pl which is available as part of the VI Perl Toolkit: http://www.vmware.com/support/developer/viperltoolkit/viperl15/doc/perl_toolkit_utilities_idx.html You can use that utility to quickly connect to ESX host and see if the VM you're looking for is hosted on a given host. You also have the option of using the VI Toolkit for Windows (Powershell)

Basically without vCenter, you'll need to loop through your hosts and query for the VM you're looking for.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
Troy_Clavell
Immortal
Immortal

I know this is a simple method and not sure if this will help, but can't you just go the the virtual machines tab and right click on the toolbar and check HOST

0 Kudos
sunvmman
Enthusiast
Enthusiast

Thank you for responding. Not sure why your perl samples are different then mine. I am using VI Perltooking 1.6.0 and do not have the .pl you mentioned.

I do have guestvar.pl which runs file but if i use --list it returns back with nothing. This is for all my virtual centers. It returns

Variable Value columns but with nothing in them.

I hope vmware makes something that you can tell from the OS itself which esx server it's runing on.

please follow-up and let me know why we have different samples

0 Kudos
lamw
Community Manager
Community Manager

Do you have VI Perl Toolkit installed on Windows or Linux? These utilities are stored in the following paths:

Virtual Appliance

/usr/local/share/doc/viperltoolkit/apps

Windows Installer

C:\Program Files\VMware\VMware VI Perl Toolkit\Perl\apps

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos