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

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

原创

itseeker 博主文章分类:Others ©著作权

文章标签 职场 休闲 vmm 文章分类 其他 数据库

©著作权归作者所有:来自51CTO博客作者itseeker的原创作品,请联系作者获取转载授权,否则将追究法律责任
从数据库删除VMM中的主机记录
https://blog.51cto.com/itseeker/457690
最近对一台受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
 
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

举报文章

请选择举报类型

内容侵权 涉嫌营销 内容抄袭 违法信息 其他

具体原因

包含不真实信息 涉及个人隐私

补充说明

0/200

上传截图

格式支持JPEG/PNG/JPG,图片不超过1.9M

已经收到您得举报信息,我们会尽快审核
提问和评论都可以,用心的回复会被更多人看到 评论
发布评论

相关文章