Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, February 10, 2017 9:19 PM
I have yet to be able to successfully remove a Hyper-V host from VMM using the console. I've had to dive into scary SQL commands every.single.time!
Here's what I did this time around:
- Click on Fabric workspace. Expand cluster, right click host, select Start Maintenance Mode.
- In the Fabric workspace, right click host that is currently in Maintenance Mode, select Remove Cluster Node from the ribbon at the top.
- Click the VMs and Services workspace. Right click host, select Remove. Enter valid credentials, click Ok.
IT DOESN'T WORK! The job fails and creates a log on the VMM server. It's always the same types of errors: "The DELETE statement conflicted with the SAME TABLE REFERENCE constraint "<ForeignKeyConstraintName>". Meaning it's either trying to delete the VM Host record out of sql before it deletes all of the foreign key references, or it's simply not deleting the foreign key references at all.
The same thing happens when I run the manual powershell command (Remove-VMHost <HostName> -Force).
I am currently running VMM 2016 (4.0.1662.0), although it was exactly the same story with 2012 R2 before I upgraded.
The only way I've been successful in actually removing a VMHost from VMM is to dive into the actual SQL tables themselves, which I know is not supported and quite a scary process. I would much rather VMM just do what I'm asking it to do and actually remove the host properly.
So... what am I doing wrong? Are there additional steps that I need to perform? More objects to delete? Obviously there's some additional information kept in SQL that is preventing me from removing VM hosts. So what is it? Can someone tell me the proper way to remove a host, please?
All replies (3)
Monday, February 13, 2017 4:34 AM
Hi Sir,
AFAIK , what you have done through the SCVMM console is the recommended operating of removing cluster node:
https://technet.microsoft.com/en-us/library/gg610667(v=sc.12).aspx
Based on this , please try to add a new cluster into SCVMM then remove cluster node to see if it works .
If the same issue appears , I'd suggest you open a case with Microsoft to check if there is any issue with VMM database .
**Global Customer Service phone numbers **
https://support.microsoft.com/en-us/gp/customer-service-phone-numbers/en-au?wa=wsignin1.0
Best Regards,
Elton
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Monday, February 13, 2017 6:10 PM
Thank you for at least verifying my sanity in that I'm doing this properly. We are about to build a brand new cluster with two completely empty Hyper-V hosts. I can try removing them right after I add them and post the results, but I expect that they will be the same. I've always experienced this problem, including the previous 2012 R2 version of VMM.
From a SQL standpoint, the issue is clear... foreign key constraints are not being adhered to. Meaning it's trying to delete a record that another record is referencing. Simply deleting records in the proper order works fine. However this is not something I should be doing manually like this. This sounds like a clear bug in the VMM console application to me.
Saturday, February 25, 2017 4:01 AM
Hi Sir,
I still suggest you to open a case with Microsoft :
https://support.microsoft.com/en-us/gp/customer-service-phone-numbers/en-au?wa=wsignin1.0
Best Regards,
Elton
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].