VMware: ESXi/vCenter find on which host a VM is running

//VMware: ESXi/vCenter find on which host a VM is running

VMware: ESXi/vCenter find on which host a VM is running

Sometimes we need to know on which host is running a VM.

Is always a pain to discover this when you don’t have your vCenter running.

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

In my opinion, 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
(vpxv_hosts.hostid = vpxv_vms.hostid)
AND (vpxv_vms.NAME = ‘virtual_machine_name’)

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

Note: Check VMware KB2004187 for more details

Hope this can help.

Note: Share this article, if you think is worth sharing.

By | 2018-11-26T02:11:25+01:00 June 29th, 2013|VMware|0 Comments

About the Author:

I am over 20 years’ experience in the IT industry. Working with Virtualization for more than 10 years (mainly VMware). I am an MCP, VCP6.5-DCV, VMware vSAN Specialist, Veeam Vanguard 2018/2019, vExpert vSAN 2018/2019 and vExpert for the last 4 years. Specialties are Virtualization, Storage, and Virtual Backups. I am working for Elits a Swedish consulting company and allocated to a Swedish multinational networking and telecommunications company as a Teach Lead and acting as a Senior ICT Infrastructure Engineer. I am a blogger and owner of the blog ProVirtualzone.com

Leave a Reply

%d bloggers like this: