Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1587
  • Last Modified:

Virtual machine - what host is it on

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
Kay
Asked:
Kay
  • 7
  • 7
  • 3
  • +2
1 Solution
 
KaySenior Systems AdministratorAuthor Commented:
when I open the vmtoolsd.exe it closes straight away.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Do you Administer the Host Servers? or is this another department or team?

have no access to vCenter Server ?
0
 
KaySenior Systems AdministratorAuthor Commented:
none we don't have a clue what host or vcenter these guest machines are on
0
 
KaySenior Systems AdministratorAuthor Commented:
I've checked all the vcenters and no luck! yea its myself that administers the vcenters.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
If the VM is currently powered on, do you know it's Mac Address?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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
 
KaySenior Systems AdministratorAuthor Commented:
yea
0
 
KaySenior Systems AdministratorAuthor Commented:
we have a cisco nexus switch, how do I search for the mac addresses on it?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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
 
Steve MCommented:
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
 
Luciano PatrãoICT Senior Infraestructure Engineer Commented:
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
 
KaySenior Systems AdministratorAuthor Commented:
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
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Use RV Tools to connect to each vCenter Server.

All the VMs are then displayed alphabetically.

How many vCenter Servers do you have ?
0
 
Steve MCommented:
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
 
KaySenior Systems AdministratorAuthor Commented:
whats rv tools?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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
 
Steve MCommented:
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
 
Luciano PatrãoICT Senior Infraestructure Engineer Commented:
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 7
  • 7
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now