How to manually remove a host from the VMM database

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.

  1. First, stop the VMMservice.
  2. 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).
  3. Now, right click on table tbl_ADHC_Host and select view or open rows.
  4. Click on the SQL button from the tool bar to get the SQL query for the view.
  5. 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.

For more information on how to manually remove virtual machines see

Comments (9)

  1. Craig Eldridge says:

    I had a Cluster that had got itself in a knot due to the Nehalem CPUs

    This is a know issue if we have installed windows 2008 R2 on a Intel Xeon processor machine which has more than 1 processor will create a blue screen. This problem occurs because spurious interrupts are generated on the computer that uses Intel code-named Nehalem processors. These interrupts are caused by a known erratum.

    On of my DB guy's wrote this code which removed it for me

    Thanks to Duane Disks




    SET @ClusterID = 'CD9DCC76-1785-4013-B742-E527DE4341B7'

    SELECT @HostID =  HostID from dbo.tbl_ADHC_Host where HostClusterID = @ClusterID

    DELETE FROM tbl_WLC_VObject WHERE HostId = @HostID

    DELETE FROM tbl_ADHC_HostCluster WHERE AvailableStorageHostID = @HostID

    DELETE FROM tbl_ADHC_HostNetworkAdapter WHERE HostID  = @HostID

    DELETE FROM tbl_ADHC_VirtualNetwork WHERE HostID = @HostID

    DELETE FROM tbl_ADHC_HostVolume WHERE HostID = @HostID

    DELETE FROM tbl_WLC_PhysicalObject WHERE HostId = @HostID

    DELETE FROM tbl_ADHC_Host WHERE HostID = @HostID

    DELETE FROM tbl_ADHC_Host WHERE HostClusterID = @HostID

    DELETE FROM tbl_ADHC_HostDisk WHERE HostID = @HostID

    DELETE FROM tbl_ADHC_ClusterDisk WHERE OwnerHostID = @HostID

    DELETE FROM tbl_ADHC_VmwResourcePool WHERE HostID = @HostID

    DELETE FROM tbl_ADHC_VmwResourcePool WHERE HostClusterID = @ClusterID

    DELETE FROM tbl_ADHC_ClusterDisk WHERE ClusterID = @ClusterID

    DELETE FROM tbl_ADHC_HostCluster WHERE ClusterID = @ClusterID


  2. nike rift says:

    I adore your site, looks excellent and full of good info. Keep it up.

  3. For VMM 2012 says:

    they've added some further constraints. You'll need to start with

    DELETE FROM tbl_NetMan_HostNetworkAdapterToLogicalNetwork where HostNetworkAdapterID in (select NetworkAdapterID from tbl_ADHC_HostNetworkAdapter where (HostID = '856D9CDE-1406-4B0E-BEE5-35147C19078E'))

    and then proceed as above

  4. More For VMM 2012 says:

    Also in VMM 2012, if you have SCSI HBAs, there are a couple more you need to do before DELETE FROM tbl_ADHC_Host…

    DELETE FROM tbl_ADHC_ISCSIHbaToTargetMapping where ISCSIHbaID in (select HbaID from tbl_ADHC_HostBusAdapter where(HostID = '856D9CDE-1406-4B0E-BEE5-35147C19078E'))

    DELETE FROM tbl_ADHC_HostInternetSCSIHba where ISCSIHbaID in (select HbaID from tbl_ADHC_HostBusAdapter where(HostID = '856D9CDE-1406-4B0E-BEE5-35147C19078E'))

    DELETE FROM tbl_ADHC_HostBusAdapter where (HostID = '856D9CDE-1406-4B0E-BEE5-35147C19078E')