ESXi server remaining in Status "Retired" instead of "Installed" after a Discovery run.DescriptionESXi server remaining in Status "Retired" instead of "Installed" after a Discovery run.Steps to Reproduce Run Discovery Schedule for Cloud Resources (Vcenter)For ESX Servers the status is flip flopping between retired and installed.Workaround Please apply the attached update set - sys_remote_update_set_398ff1b31b1b3090744943f8ab4bcb6e (1).xml to resolve the ESX flip flop issue.The changes done in the script include - VCenterDatacentersSensor are mentioned as follows:1. Get the MorID from the payload output2. Query the morid in cmdb_ci_vcenter_datacenter and fetch its sys_id3. Using the datacenter_sysid query the cmdb_rel_ci and find all the sys id of the esx servers4. Using this esx servers when we are running the query to mark the ones that are retired.-->This ensures that whenever a probe runs the updatestaleness method, it marks only those esx servers asretired which are in the current datacenter, hence avoiding the changing values.var moridlist = [];var datacenterlist = [];//1. Get the MorID from the payload outputfor(var i=0;i <output.cmdb_ci_vcenter_datacenter.length; i++)moridlist.push(output.cmdb_ci_vcenter_datacenter[i].morid);//2. Query the morid in cmdb_ci_vcenter_datacenter and fetch its sys_idvar dc = new GlideRecord('cmdb_ci_vcenter_datacenter');dc.addQuery('morid', "IN" , moridlist);dc.query();while (dc.next())datacenterlist.push(dc.sys_id.toString());//3.Using the datacenter_sysid query the cmdb_rel_ci and find all the sys id of the esx serversvar esxArray = [];var rel = new GlideRecord('cmdb_rel_ci');rel.addQuery("parent.sys_class_name", 'cmdb_ci_esx_server');rel.addQuery("child.sys_class_name", 'cmdb_ci_vcenter_datacenter');rel.addQuery("child.sys_id", "IN", datacenterlist);rel.query();while(rel.next())esxArray.push(rel.parent.sys_id);// Mark stale ESX servers as 'retired'esxGr = new GlideMultipleUpdate('cmdb_ci_esx_server');esxGr.addQuery('vcenter_ref', vCenterSysId);esxGr.addQuery('object_id', 'NOT IN', output.hosts);esxGr.addQuery('install_status', '!=', '7');esxGr.addQuery('sys_id', 'IN', esxArray);esxGr.setValue('install_status', '7'); //Retired = 7esxGr.setValue('sys_updated_on', gs.nowNoTZ());esxGr.updateMultiple(); Related Problem: PRB1536277