Edited on 18.04.2017: The same procedure verified to be working with VMM (Virtual Machine Manager) also. Googled my error message and found my own blog post, what a shame
When adding a hyper-v host to Data Protection Manager Server, you might get the following error:
Error (21201)
Another machine with the same SMBIOSGUID is found.
Recommended Action
An SMBIOS GUID should uniquely identify the machine. Please provide the correct value or contact the machine manufacturer to help update the hardware with correct information.
The problem usually is with the same computer have been managed using the same dpm server, but not correctly removed from dpm.
Help comes with following SQL command:
SELECT a.PhysicalMachineId,b.ComputerName FROM tbl_PMM_PhysicalMachine a left join tbl_ADHC_Host b on a.PhysicalMachineId = b.PhysicalMachineId order by ComputerName
This command finds all computers, that are present in DPM server and shows physical machine ID and computer name. Try to find computers with name not present (NULL). If you have them, then delete those records from tbl_PMM_PhysicalMachine table. Use corresponding physicalmachineID for finding them.
Edit on 26.04.2017 --------------------------------------
The command to delete the NULL entries is:
delete from tbl_PMM_PhysicalMachine where PhysicalMachineId = (SELECT a.PhysicalMachineId FROM tbl_PMM_PhysicalMachine a left join tbl_ADHC_Host b on a.PhysicalMachineId = b.PhysicalMachineId where ComputerName is null)
Edit on 10.06.2022 --------------------------------------
Now let's find all computers SMBIOSGUID with that SQL clause:
I just found this post and successfully deleted several NULL entries, but upon restarting services, the NULL entries and bogus PhysicalMachineIDs just repopulate. This is 2016 though...maybe the host IDs are referenced elsewhere. They are NOT in tbl_ADHC_Host
ReplyDeleteDo you have any issue at the moment. I'm glad to help you out. Please describe it, if you have.
ReplyDeleteHi Rauno! When I run the query I get three results with NULL values. If I try to use your second query to delete those values I get an error like this one:
ReplyDeleteSubquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
If I try to use query:
Delete from tbl_PMM_PhysicalMachine
where SmBiosGuid IS NULL;
I get this:
The DELETE statement conflicted with the REFERENCE constraint "FK__ADHC_HostNetworkAdapter__PMM_PhysicalMachine".
The conflict occurred in database "VirtualManagerDB", table "dbo.tbl_ADHC_HostNetworkAdapter", column 'PhysicalMachineId'.
If you could help me I would appreciate it.
Thank you!
Jack
Something in table ADHC_HostNetworkAdapter is preventing the deletion. You should get rid the conflicting records in that table.
ReplyDeleteFor anyone struggling with the above issue of enforced constraints this is what I did:-
ReplyDeleteFind out the PhysicalMachineID as above:-
SELECT a.PhysicalMachineId,b.ComputerName FROM tbl_PMM_PhysicalMachine a left join tbl_ADHC_Host b on a.PhysicalMachineId = b.PhysicalMachineId order by ComputerName
I had 3 from an old cluster that had been destroyed and not removed properly.
Then I ran :-
delete from tbl_ADHC_HostNetworkAdapter where PhysicalMachineId = 'E0A607CD-B06C-42DD-81BD-FBCF55059BC3';
delete from tbl_ST_StorageFileServerNode where PhysicalMachineId = 'E0A607CD-B06C-42DD-81BD-FBCF55059BC3';
delete from tbl_PMM_PhysicalMachine where PhysicalMachineId = 'E0A607CD-B06C-42DD-81BD-FBCF55059BC3';
Where the PhysicalMachineID is the GUID from the first table.
I'm sure some SQL Ninja could wrap that into one task, but for me it worked.
Thanks for sharing that information
Delete