To identify the host on which the virtual machine runs, use one of these methods:
Query the vCenter Server database in MSSQL:
- Log in to to the Microsoft SQL 2005/2008 Server as an administrator.
- Open SQL Management Studio.
- Right-click the database that vCenter Server is using.
- Open a new query window and ensure that the vCenter Server database is selected.
- Run this SQL statement :
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 = '<b><em>virtual_machine_name</em></b>') )
This query returns the virtual machine ID, virtual machine name, host ID, and host name.
Leave a Reply