This article explains how to remove Virtual Machine instance records from the cmdb_ci_vm_instance table in ServiceNow that are marked as deleted in Flexera One IT Visibility. This ensures synchronization between Flexera One and the ServiceNow CMDB for accuracy and consistency across both systems.
Background
When a Virtual Machine is deleted in Flexera One IT Visibility, the Delta API sends the corresponding data to the Hardware Inventory Import staging table in ServiceNow with a remove opcode. The scoped application then updates the state field of the Virtual Machine instance record in the CMDB to Terminated.
Cleanup steps:
- Create a scheduled script execution
- Navigate to Scheduled Script Executions (
sysauto_script) in the Global Scope. - Create a new record.
- Set the Run option to On Demand.
- Add the cleanup script
- Paste the following script into the Script field:
var vmi = new GlideRecord('cmdb_ci_vm_instance');
vmi.addEncodedQuery('discovery_source=FlexeraOne^state=terminated');
vmi.query();
while (vmi.next()) {
vmi.setWorkflow(false); // Disable business rules/workflows for this record
vmi.deleteRecord(); // Delete the current record
}
- Execute the script
- Save the record.
- Click Execute Now.
- Validate cleanup
- Check the Progress Worker to confirm the script has completed.
- Verify that all records in the
Virtual Machine Instancestable with the following values have been deleted: Discovery source = Flexera OneState = Terminated
After the script completes, all terminated virtual machine instance records originating from Flexera One will be removed from the ServiceNow CMDB, helping maintain alignment between Flexera One inventory data and ServiceNow configuration records.
Related Articles
Azure VM instances with a "Stopped" or "Stopped (deallocated)" status are inappropriately treated as terminated 7Number of Views Use a cleanup script to remove VM instance records in Flexera One ServiceNow app 1.7 18Number of Views Inventory device records are not created for cloud instances that are re-activated after being identified terminated 7Number of Views "Get Azure VM Instances" Azure import reader step may fail with error: "Could not load file or assembly '[...]' or one of … 16Number of Views Inventory device records for AWS instances are deleted if AWS status was "terminated" or failed to be retrieved at any tim… 10Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago