Thursday, July 01, 2010 7:12 PM
Fawzi
VMM tricks: How to manually remove a host from the VMM database
Source
The following steps outline the procedure to manually remove a host
cluster from the VMM database. In this specific example, we are removing
a two node cluster.
Note The GUIDs listed below are specific to this
example. If following these instructions, you will need to determine
this same information for your specific environment. This information
can be found in the tbl_ADHC_Host.
The following steps outline the manual process of removing all
references to the existing host from the VMM database. This should only
be used as a last resort option after all other means have been
exhausted.
- First, stop the VMMservice.
- Then, take a backup of the existing DB using SQL Management studio.
(Right click on DB name, choose tasks, click on Back up, chose a full
backup).
- Now, right click on table tbl_ADHC_Host and select view or open
rows.
- Click on the SQL button from the tool bar to get the SQL query for
the view.
- In there, start pasting the commands below one by one and verifying
they executed correctly. (To execute, you can highlight the command and
press F5 or press the “!” symbol).
DELETE FROM tbl_ADHC_HostNetworkAdapter WHERE (HostID =
’85099616-fdc8-4f85-a702-979a4251f050′)
DELETE FROM tbl_ADHC_HostNetworkAdapter WHERE
HostID=’8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘
DELETE FROM tbl_ADHC_VirtualNetwork WHERE (HostID =
’85099616-fdc8-4f85-a702-979a4251f050′)
DELETE FROM tbl_ADHC_VirtualNetwork WHERE (HostID =
’8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_ADHC_HostVolume WHERE (HostID =
’85099616-fdc8-4f85-a702-979a4251f050′) OR (HostID =
’8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_ADHC_HostDisk WHERE (HostID =
’85099616-fdc8-4f85-a702-979a4251f050′) OR (HostID =
’8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_WLC_PhysicalObject WHERE (HostId =
’85099616-fdc8-4f85-a702-979a4251f050′) OR (HostId =
’8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_WLC_VObject WHERE (HostId =
’85099616-fdc8-4f85-a702-979a4251f050′) OR (HostId =
’8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_ADHC_Host WHERE (HostID =
’85099616-fdc8-4f85-a702-979a4251f050′) OR (HostID =
’8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_ADHC_ClusterDisk WHERE (ClusterID =
’1148853c-cde3-45d2-82ee-bb04259d6a79′)
DELETE FROM tbl_ADHC_HostCluster WHERE (ClusterID =
’1148853c-cde3-45d2-82ee-bb04259d6a79′)
DELETE FROM tbl_ADHC_AgentServerRelation WHERE (AgentServerID =
’648e977e-d10e-40b6-aca2-d9d2dc63b790′)
DELETE FROM tbl_ADHC_AgentServer WHERE (ComputerName = ‘Server_Node1′)
DELETE FROM tbl_ADHC_AgentServer WHERE (ComputerName = ‘Server_Node2′)
6. Now start the vmmservice and open the VMM console.