If a machine is rebuilt and given a different name but keeps its domain name, it receives the Guid of the old computer resource and new computer resource isn't created.

Article:TECH152333  |  Created: 2011-01-31  |  Updated: 2012-07-28  |  Article URL http://www.symantec.com/docs/TECH152333
Article Type
Technical Solution


Environment

Problem



If a machine is rebuilt and given a different computer name but keeps its domain name, it receives the Guid of the old computer resource and new computer resource isn't created.


Environment



NS 7.0 Sp5


Cause



The NS creates a uniqueid stored as a MD5 hash of the computer's serial number, mac address and UUID collected by basic inventory (aex_ac_identification) in the resourcekey table.  A uniqueid is created for each NIC a computer may have. The uniqueIds, the name.domain and the fqdn values are are evaluated at the time of the resource creation process and if there is a match, the existing guid is returned to the client.


Solution



This is working as designed.

 

Possible workaround:
 
There is a stored procedure that runs with the resource keys returned by the new client which includes the name.domain, fqdn, and uniqueids.  
  
This is the query that runs. The keyvalues are pulled from the client at run time and inserted into the query. 
 
EXECUTE dbo.[spRM_Virtual_Machine_LookupResourcesByKeys] @KeyName=N'name.domainfqdnuniqueiduniqueid', @KeyValue=N'KENSXP4D.LJSDOMKENSXP4D.LJSDOM.COM21PJWW1WO2W9VOV046/OWQ==J1WFQJCZ4VNTBYVPNG0XPQ=='
 
Add into your process to run a query to delete the uniqueid from the resourcekey table for the guid for that machine you are reimaging/recycling using the following query:
 
Update ResourceKey set KeyValue = Null where KeyName = 'uniqueid' and ResourceGuid = '..guid here..'
 
You could probably automate this possibly by:
 
1.       Install CMDB solution on the NS if you haven’t already done so.
2.       Create a new status in CMDB called “Reprovisioned” for example.
3.       Create a CMDB rule that runs a query to delete the uniqueids from the resourcekey table for any computer with a status of reprovisioned
4.       OR create a notification policy that runs a SQL query to delete the uniqueids from the resourcekey table for any computer with a status of reprovisioned.
5.       Schedule this to run every  5 minutes or so.
 
Then when you want to reimage and recycle a computer an Administrator will just have to set the status on the computer in the console to “Reprovisioned”
 
The query would look something like:
 
Update resourcekey set keyvalue = Null where keyname = uniqueid and resourceguid in (select _resourceguid from vasset where status = 'Reprovisioned')
 



Article URL http://www.symantec.com/docs/TECH152333


Terms of use for this information are found in Legal Notices