从数据库删除VMM中的主机记录

最近对一台受SCVMM2008 r2 管理的服务器升级,事先没有把该服务器从vmm的控制台中删除记录,直接把操作系统从server core 换到 win2k8 R2. 在后来打算安装vmm 代理的时候,发现安装失败,大概提示该主机已经和vmm管理器关联.到控制台,发现原来这台服务器还出现在控制台中,并且无法删除.成了幽灵主机了....后来google到一个处理vmm群集主机的解决方案,参照此文,搞定了手头的麻烦,特地记录一下,备查.
   

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.  Please note that 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
<?xml:namespace prefix = o />

 
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.

 
http://blogs.technet.com/mbriggs/archive/2009/05/13/how-to-manually-remove-a-host-from-the-vmm-database.aspx

转载于:https://blog.51cto.com/itseeker/457690

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值