Sunday, November 24, 2013

Find out VM registered on esx hosts when Virtual Center is DOWN

use below sql query to find out any particular virtual machine when vCenter Server is down .

Steps are :--

1. Log in to the Microsoft SQL 2005/2008 Server running on the sever i.e. osekimw201 .

2. Open SQL Management Studio.

3. Select the virtual center database i.e. virtualcenter_db.

4. Open a new query window.

5. 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 = 'virtual machine name ')
)

This query returns the virtual machine ID, virtual machine name, host ID, and host name.

No comments:

Post a Comment