VM Instance State and Status Fields updated post discoverySummary<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } This article explains how the , VM Instance State and Status Fields updated post discovery Facts<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } VM instance status fields are updated through below discovery mechanisms: Scheduled or on-demand vCenter DiscoveryVcenter discovery input post receiving input from vcenter API are received in form of events, the VCenterVmStateUpdater script include is called to format the payload.CMDB Business Rules that synchronize status between VM Instances and related Server CIs Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } After x version Instructions<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } How the record gets updated in discovery vCenter Discovery uses Probes and Sensors for data collection. During discovery, the VMWarevCenterVMsProbe MID Script Include retrieves the power state for each virtual machine discovered in the current run.The VM state is derived as follows:If runtime.powerState = poweredOn, the VM state is set to OnIf runtime.powerState = poweredOff, the VM state is set to OffAny other value (for example, suspended states) is treated as Paused VM instance-stateVM instance - Install StatusVM instance - Operational StatusServer CI - Install statusServe CI - Operational statusOnInstalledNo change without Sync Ops* BRInstallNo change without Sync ops * BRTerminatedRetiredNo change without Sync ops * BRRetiredNo change without Sync ops * BROFF/ PausedNo changeNo changeNo changeNo change During the vCenter discovery, In the "VCenterDatacentersSensor" Script include, We look for the VMs that belongs to same vCenter but not found in the current discovery run then we mark those as stale and update their install_status ("Status") to Retired ("7").The same information can be reviwed in : https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0863030 There are 2 different set of BR works for the process to sync install and operational status on VM instance and related server CI. Business Rule: "Cascade deprovisioned status to Server" This OOB (Out-of-Box) business rule is the core mechanism that cascades deprovisioning status from VM to Server. Attribute Details Rule Name Cascade deprovisioned status to Server Target Table cmdb_ci_vm_instance Trigger When cmdb_ci_vm_instance is updated/inserted Condition current.operational_status == 6 (Retired) Action Find related Server CI via instantiates::instantiated_by relationship Update Set Server CI operational_status = 6 (Retired) How Status Cascade Works Step-by-Step VM power_state = TERMINATED collected from vCenter APIVCenterVirtualMachineSensor sets install_status="Retired", operational_status=6VM CI is updated in cmdb_ci_vm_instance tableBusiness rule "Cascade deprovisioned status to Server" triggers on updateRule checks: if current.operational_status == 6 (is it retired?)Rule executes: Find related Server CI via instantiates relationshipRule action: Update Server CI with operational_status=6 (Retired)Server CI is now marked as Retired/Deprovisioned in CMDB Audit log created showing "System User" updated Server CI status There are no other directly affecting the CI Operational/Install status changes in VM instance , if changes done manually in State field of VM instance Business Rule: "Sync Ops status". Logic is If operational_status = 6 (Retired) → FORCE install_status = 7 (Retired) If install_status = 7 (Retired) → FORCE operational_status = 6 (Retired) This is the fundamental constraint the rule enforces! Use case: VM completely removed/terminated in vCenter. vCenter discovery finds VM missing, sets power_state = TERMINATEDVCenterVirtualMachineSensor sets operational_status=6 (Retired)Sync Ops Status BR runs; detects ops_status changed to 6BR immediately sets install_status=7 (Retired) on same VMVM saved with ops_status=6 AND install_status=7Cascade BR activates: Cascade deprovisioned status to ServerCascade BR finds related Server CI via instantiates relationshipCascade BR sets Server CI operational_status=6Sync Ops Status BR runs on Server; sets install_status=7Result: Both VM and Server marked retired with consistent status