Force Removal of pendiong Host from SCVMM 2019 Database

Ali Touseef 6 Reputation points
2021-07-31T14:00:31.8+00:00

Hello,
i had problem with some HyperV hosts and they had to be reinstalled. When i tried to add them back to SCVMM, they would always remain pending and would fail to add. so i removed the entire cluster. Initially we tried to use the Remove-SCVMhostCluster PS and console but that fail. So we used the SQL Script shared by some of the Tech Experts on the internet. i was able to remove the entire cluster except one node which hangs on and gives the below error.

The DELETE statement conflicted with the REFERENCE constraint "FK_tbl_WLC_PhysicalObject_tbl_ADHC_HostVolume". The conflict occurred in database "VirtualManagerDB", table "dbo.tbl_WLC_PhysicalObject", column 'HostVolumeId'.

i have executed query to check what is common between the two table and havent been able to find any thing in the physicalObject Table from HostVolume table. but the reference to the Hyper-V Host in questions fails to be deleted from ADHC_HostVOlume table and hence from the ADHC_Host and Cluster tables.

the script to remove the cluster was used in the below post.
http://raunomagi.blogspot.com/2013/07/how-to-manually-remove-cluster-and-host.html-

any help would be highly appreciated.

System Center Virtual Machine Manager
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,819 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Karl Witt 0 Reputation points
    2025-02-17T11:04:35.9533333+00:00

    Did you find a solution for this problem?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.