VMware Vcenter Discovery - Duplicate Hardware Models repeatedly created as part of Discovery.Issue Duplicate Hardware Model records are being created repeatedly during Discovery, and these records are surfacing in the "Fill in Missing Manufacturer" queue within the HAM workspace. Symptoms 1. Customer initiates a Discovery run against the vCenter.2. cmdb_ci_storage_hba CI Model records are created with no Manufacturer value populated.3. These records appear in the HAM workspace under the "Fill in Missing Manufacturer" queue for remediation.4. Customer manually adds the missing Manufacturer to the affected records.5. On the next Discovery run against the same vCenter, the same Model records are recreated again with an empty Manufacturer — overwriting the previously added value. Release ALL Cause The models are created when processing data for Host Bus Adapters (cmdb_ci_storage_hba). Sample data retrieved for cmdb_ci_storage_hba is below.{"name":"vmhba1","device_id":"vmhba1","wwnn":"20000025b5211009","computerMorid":"host-51224","model_id":"Cisco VIC FCoE Controller","idx":0} While processing the data within the script include "VCenterESXHostsStorageSensor", a call is made to fetch the model with manufacturer as null.var mm = MakeAndModelJS.fromNames(null, hba.model_id, 'hardware');MakeandModelJs script include generally matches the model based on manufacturer and name.During the first run the model is created with manufacturer as empty. The manufacturer later gets updated from the HAM workspace. The next run post remediation cannot find the same model with empty manufacturer and a new one gets added leading to duplicates. Resolution VMware does not supply vendor-specific details for Host Bus Adapters (HBA). For more information, please refer to the VMware API documentation provided below: https://developer.broadcom.com/xapis/vsphere-web-services-api/latest/vim.host.HostBusAdapter.html#bus.This limitation originates from the VMware API, and as such, it may not be eligible for a PRB or considered for an enhancement. Instance specific Workaround:1. Before creating a new hardware model with a blank manufacturer, the system first checks whether a model with the same name already exists. 2. If a match is found, the existing model is used; otherwise, a new record is created. Code Changes required:1. `global.MakeAndModelJS` (/sys_script_include.do?sys_id=d7c58843ef72010098d5925495c0fb82)Add this method:MakeAndModelJS.getHardwareModelByName = function(modelName) {var gr = new GlideRecord("cmdb_hardware_product_model");gr.addQuery('name', modelName.trim());gr.setLimit(1);gr.query();if (gr.next()) {return gr.getUniqueValue();}return null;};2. In`VCenterESXHostsStorageSensor` (/sys_script_include.do?sys_id=54f22f788f731200c2fe0b5437bdeeaf)In the `fixupHba(hba)` method, add code to check for an existing model:function fixupHba(hba) {var model = MakeAndModelJS.getHardwareModelByName(hba.model_id);if (!gs.nil(model)) {hba.model_id = '' + model;} else {var mm = MakeAndModelJS.fromNames(null, hba.model_id, 'hardware');hba.model_id = '' + mm.getModelNameSysID();}hba.wwnn = StorageWWN.parse(hba.wwnn);hba.computer = lookUpSysIds(hba.computerMorid, 'cmdb_ci_esx_server', esxSysId || vCenterSysId, 'morid');}Note: 1. The workaround provided is instance specific. Please assess the instance before suggesting the workaround. 2. Please try the changes in subprod before trying in prod.