The "Nutanix Relations" Pattern Pre/Post Script can create the "Instantiates::Instantiated by" relationship with a Retired ServerIssue The "Nutanix Relations" Pattern Pre/Post Script can create the "Instantiates::Instantiated by" relationship between a "Nutanix Virtual Machine Instance" and a "Server" with "Retired" Status (install_status).In Nutanix Architecture it is possible that the IP Address of a "Retired" Server will be re-used for provisioning another Server which will have "Installed" Status. In this case, there can exist multiple Servers with similar IP Address but only one of the Server will be in "Installed" Status and the rest of the Servers will be in "Retired" Status.The incorrect relationship issue occurs when there exists two or more CIs with similar IP Address and the relationship is created with the Server with "Retired" Status instead of the Server with "Installed" Status.CauseThis issue is because of the Pattern Pre/Post Script "Nutanix Relations" which uses the "IP Address" and "Manufacturer" details to create the relationship and there exists no check to determine the "Status"(install_status) of the matching Server. This script does not create the relationship between the "Nutanix Virtual Machine Instance" and the "Server", if "IP Address" is not populated on the Server which can happen if Servers are imported from a Data Source. https://<instance_name>.service-now.com/sa_pattern_prepost_script.do?sys_id=2e5bb0c3db383f4097db90c7db961965 var searchByIPAndManufacturer = function(currentVM, serverClass, manufacturerSysId) { var relOS; if (typeof(currentVM.ip_address) != 'undefined' && currentVM.ip_address != null && manufacturerSysId != null) { var glideRecord = new GlideRecord(serverClass); glideRecord.addQuery('ip_address', '=', currentVM.ip_address); glideRecord.addQuery('manufacturer', '=', manufacturerSysId); glideRecord.query(); if (glideRecord.next()) { relOS = { 'sys_class_name': glideRecord.getValue('sys_class_name'), 'sys_id': glideRecord.getValue('sys_id') }; } } return relOS;};============================================================================================ The above method in the script does not check the "install_status" of the Server while matching the "ip_address", "manufacturerSysId" and can create the relationship with a "Retired" Server if one exists with similar "ip_address" and "manufacturerSysId" which is possible in Nutanix.ResolutionPlease apply the attached update set to fix the issue. The changes done in the script in the update set provided are as follows: - The script is modified to check the "install_status" before creating the relationship and the relationship is created only if the "install_status" of the Server is "1" (Installed). glideRecord.addQuery('install_status', '=', 1); // install_status = active - This will eliminate the possibility of creating the relationship with "Retired" Servers. - Another method "searchBySerial" is added to the script which will try to match the UUID of "Nutanix Virtual Machine Instance" to the "serial_number" of the "Server". var searchBySerial = function(currentVM, serverClass) - This method is created as a fallback method to "searchByIPAndManufacturer" method, in case no Server is found with matching IP Address. var findRelatedOS = function(currentVM, serverClass, manufacturerSysId) {var relOS;relOS = searchByIPAndManufacturer(currentVM, serverClass, manufacturerSysId);if (!relOS) {relOS = searchBySerial(currentVM, serverClass);}return relOS;};