Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Virtual machine - what host is it on

Posted on 2014-04-01
20
1,371 Views
Last Modified: 2014-04-17
HI Guys,

I am logged into a VMware virtual machine, it is windows server 2008 r2 server and I need to know which host it is sitting on.

How can I find out?

Thank you in advance,

K
0
Comment
Question by:Kay
  • 7
  • 7
  • 3
  • +2
20 Comments
 
LVL 20

Expert Comment

by:n2fc
ID: 39968730
0
 

Author Comment

by:Kay
ID: 39968745
when I open the vmtoolsd.exe it closes straight away.
0
 
LVL 119
ID: 39968752
This will be very difficult to work out which VM is on which host, from the guest VM.

Do you have access to the host via vSphere Client or physical switches?

if you know which physical network ports the hosts are connected to, you can track the Mac Address of the VM, and then check your physical switch for that mac address.

by checking the mac address on physical switch ports, against mac address of host on same ports, will allow to to work out, where the VM is located.

But if you have functions like VMware HA or DRS, it could be on any host in the cluster.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 119
ID: 39968870
Do you Administer the Host Servers? or is this another department or team?

have no access to vCenter Server ?
0
 

Author Comment

by:Kay
ID: 39968868
none we don't have a clue what host or vcenter these guest machines are on
0
 

Author Comment

by:Kay
ID: 39968882
I've checked all the vcenters and no luck! yea its myself that administers the vcenters.
0
 
LVL 119
ID: 39968896
If the VM is currently powered on, do you know it's Mac Address?
0
 
LVL 119

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 500 total points
ID: 39968920
So can you search your physical switches for the MAC Address ?

if you know the IP Address, you can search all the VMs on vCenter Server.

have you also tried using RV Tools ?

http://www.robware.net/
0
 

Author Comment

by:Kay
ID: 39968915
yea
0
 

Author Comment

by:Kay
ID: 39968924
we have a cisco nexus switch, how do I search for the mac addresses on it?
0
 
LVL 119
ID: 39968930
Do you know what type of hosts you have?

e.g. processors in the hosts?

are all hosts identical ?

did you try connecting with RV Tools?

RV Tools will list all VMs in alphabetical order, and has a host column?
0
 
LVL 5

Expert Comment

by:Steve M
ID: 39969335
is it possible you have an esx server that is not currently managed by vcenter?  check your vcenter and make sure that all your esxi hosts are accounted for, it's possible a host was or became disconnected from vcenter.  The VM's will still be running on the stand alone host and you won't see if from vcenter.  If you find an ESX host that's missing from your vcenter inventory then that's likely where the vm lives.  you'll have to connect to the esx host directly via vsphere client to see the guests running on it or add the esxi host back into inventory in vcenter.

Good Luck.
Steve
0
 
LVL 23

Expert Comment

by:Luciano Patrão
ID: 39971963
Hi

You can check the VM logs etc.,(looking for something similar to 2012-10-10T02:04:01.999Z| vmx| Hostname=name_of_host)

But for me the best option is just run a query directly in the vCenter DB.

Just run this simple query in the vCenter DB(should be VIM_VCDB, or just VCDB)

SELECT vpxv_vms.vmid, vpxv_vms.NAME, vpxv_vms.hostid, vpxv_hosts.NAME
FROM vpxv_vms
JOIN vpxv_hosts on VPXV_VMS.HOSTID = VPXV_HOSTS.HOSTID
WHERE (
(vpxv_hosts.hostid = vpxv_vms.hostid)
AND (vpxv_vms.NAME = 'virtual_machine_name')
)

Open in new window


This will give you in a simple line the VM and the host that is running.

Hope this can help.

Jail
0
 

Author Comment

by:Kay
ID: 39972353
that problem I don't know which vcenter it is on, if I knew which vcenter than I wouldn't need to run this command, I presume u got this from the VM site.
0
 
LVL 119
ID: 39972389
Use RV Tools to connect to each vCenter Server.

All the VMs are then displayed alphabetically.

How many vCenter Servers do you have ?
0
 
LVL 5

Expert Comment

by:Steve M
ID: 39972609
Do you know how many physical esxi hosts you have?  count them up in your vcenters and ensure they are all accounted for.  You could have an esx host that isn't managed by vcenter.  Have you looked at that yet?
0
 

Author Comment

by:Kay
ID: 39972670
whats rv tools?
0
 
LVL 119
ID: 39972750
it's an application, that quickly shows vCenter information, in a spreadsheet format...

download here

http://www.robware.net/

install, run, enter vcenter IP address, username and password, connect!
0
 
LVL 5

Expert Comment

by:Steve M
ID: 39972796
Here's an option, although a little bit of a crazy one depending on the number of hosts.  I'm not sure how many esx hosts you have, but you could set each host's time just slightly different (say 5 minutes different from each other) write them all down, (esx1 +5, esx2 +10. esx3 +15, etc) and run this command from the guest: (note the time that you run the command)

C:\Program Files\VMware\VMware Tools>VMwareToolboxCmd.exe stat hosttime

This will return the time from the host that the guest is connected to, use the results to determine your host. (eg. if the time returned is 10 minutes fast, then it's connected to esx2 on my example above).
0
 
LVL 23

Expert Comment

by:Luciano Patrão
ID: 39974974
Hi,

If you have more then one vCenter just run the query on each DB, and you will get the result.

Jail
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If we need to check who deleted a Virtual Machine from our vCenter. Looking this task in logs can be painful and spend lot of time, so the best way to check this is in the vCenter DB. Just connect to vCenter DB(default DB should be VCDB and using…
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question