LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-24-2011, 01:23 PM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
How do I determine the ESX host that a VM is on?


Is there a way in linux to find out which ESX host it is on, from the command line?
 
Old 05-24-2011, 02:19 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I don't know if there is a direct way within the hypervisor communications, but you can certainly use the perl SDK vminfo.pl script to go to vcenter and find out. I would *doubt* there was a direct way as it's actually a pretty odd thing to want to know, and largely none of its business as it were. So I would expect to need some sort of explicit admin toolset to find this out form the "outside" as it were.
 
Old 05-24-2011, 02:26 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
Originally Posted by acid_kewpie View Post
I don't know if there is a direct way within the hypervisor communications, but you can certainly use the perl SDK vminfo.pl script to go to vcenter and find out. I would *doubt* there was a direct way as it's actually a pretty odd thing to want to know, and largely none of its business as it were. So I would expect to need some sort of explicit admin toolset to find this out form the "outside" as it were.
I do not have Vcenter, but I am unfortunately in charge of a clients environment that has over 200 ESX servers.

When I log into a Guest VM, it would be extremely helpful to be able to figure out which one of the 200+ ESX servers it is sitting on.

What I figured out though, is that I can use tcpdump to listen for the CDP packet which gives me the switch and port the VM is connected to, which luckily enough is always close to the ESX host port. I popped into the switch, looked at the description and was able to figure out which ESX host it was.

Thanks.
 
Old 05-24-2011, 02:28 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Argh! CDP! kill it with fire!!! Using bad technology for good is still bad. You should get CDP exterminated.

I think the SDK can hit VM hosts directly too.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create bash script to start esx host service? jhanevd Programming 3 03-07-2009 08:35 AM
How do I determine the physical DIMM configuration on and ESX blade server? caggles Linux - Newbie 1 04-08-2008 04:18 PM
SlackWare 12 VM on VMware ESX 3.0.2 host petcherd Slackware - Installation 2 08-25-2007 01:54 PM
Determine OS of some host :) c00kie Linux - Security 23 04-11-2007 05:31 AM
How do i determine my IP address? How do i determine my host name? jwymore Linux - Networking 5 02-07-2007 09:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration