CMDB query on Dynamic CI group showing both host CIs and VM instance CIs

roshanmahar
Tera Contributor

Hi All,

 

I have a CMDB query that has windows server table as starting node and connection to VM instance table whic has any type of relationship with certain conditions. However although in query results , it only shows server CIs, while using this CMDB group query in Dynamic CI group, it shows both server CIs and VM instance CIs. Please check attached screenshots.

 

Has anyone experience similar issues in CMDB query and Dynamic CI group

6 REPLIES 6

pavani_paluri
Giga Guru

Hi @roshanmahar ,

 

Please try adding a filter to Dynamic CI group record to query for windows servers only.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P

Hi pavani,

Thank you for your reply.

I am using cmdb query for this so cant use that filter you mentioned.

AJ-TechTrek
Giga Sage
Giga Sage

Hi @roshanmahar ,

 

As per my understanding Problem explanation is :-



When you build a CMDB Query starting with Windows Server and connect to Virtual Machine Instance (with “Any relationship”), the query results view in CMDB Query Builder correctly shows only the starting node (Windows Server) in the list view — because it’s showing what the query “starts from.”


However, when you create a Dynamic CI Group using this CMDB Query:


* By default, the Dynamic CI Group includes all CIs from all nodes in the query, not just the starting node.
* So it ends up containing both the Windows Server CIs and the connected VM Instance CIs.


Why:
Dynamic CI Group does not care about which node is the starting node; it aggregates all CIs from all nodes that meet the query. That’s why both sets show up.

 

Solution To make the Dynamic CI Group contain only the Windows Server CIs:


1. In the CMDB Query Builder, click on the node (Windows Server) → on right panel, there is an option to “Include in Dynamic CI Group.”
2. Make sure only the starting node (Windows Server) is checked to be included in the Dynamic CI Group.
3. Uncheck/disable the VM Instance node from being included.
4. Save the query, and update the Dynamic CI Group with this query.

 

if your version doesn't show this option:
* Check you’re on San Diego or later (Yokohama also has it).
* Make sure you have the correct roles (e.g., cmdb_query_admin).

 

Extra tips:
* If your business logic really wants only the starting CIs: always double-check the "Included in result set" checkboxes per node.
* Avoid “Any relationship” if possible; prefer specific relationship types to keep data clean.
* Always test the Dynamic CI Group membership after saving.

 

Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
 

Thank You
AJ - TechTrek with AJ - ITOM Trainer
LinkedIn:- https://www.linkedin.com/in/ajay-kumar-66a91385/
YouTube:- https://www.youtube.com/@learnitomwithaj
Topmate:- https://topmate.io/aj_techtrekwithaj (Connect for 1-1 Session)
ServiceNow Community MVP 2025

Hi @roshanmahar ,

 

As per my understanding Problem explanation is :-



When you build a CMDB Query starting with Windows Server and connect to Virtual Machine Instance (with “Any relationship”), the query results view in CMDB Query Builder correctly shows only the starting node (Windows Server) in the list view — because it’s showing what the query “starts from.”


However, when you create a Dynamic CI Group using this CMDB Query:


* By default, the Dynamic CI Group includes all CIs from all nodes in the query, not just the starting node.
* So it ends up containing both the Windows Server CIs and the connected VM Instance CIs.


Why:
Dynamic CI Group does not care about which node is the starting node; it aggregates all CIs from all nodes that meet the query. That’s why both sets show up.

 

Solution To make the Dynamic CI Group contain only the Windows Server CIs:


1. In the CMDB Query Builder, click on the node (Windows Server) → on right panel, there is an option to “Include in Dynamic CI Group.”
2. Make sure only the starting node (Windows Server) is checked to be included in the Dynamic CI Group.
3. Uncheck/disable the VM Instance node from being included.
4. Save the query, and update the Dynamic CI Group with this query.

 

if your version doesn't show this option:
* Check you’re on San Diego or later (Yokohama also has it).
* Make sure you have the correct roles (e.g., cmdb_query_admin).

 

Extra tips:
* If your business logic really wants only the starting CIs: always double-check the "Included in result set" checkboxes per node.
* Avoid “Any relationship” if possible; prefer specific relationship types to keep data clean.
* Always test the Dynamic CI Group membership after saving.

 

Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
 

Thank You
AJ - TechTrek with AJ - ITOM Trainer
LinkedIn:- https://www.linkedin.com/in/ajay-kumar-66a91385/
YouTube:- https://www.youtube.com/@learnitomwithaj
Topmate:- https://topmate.io/aj_techtrekwithaj (Connect for 1-1 Session)
ServiceNow Community MVP 2025


Hi AJ, 

Thank you for taking time to reply. I have tried to Uncheck/disable the VM Instance node from being included but dont see any option to do so. I am in Xanadu and checked my roles, I have cmdb admin role, cmdb_query_builder role, but cant see  cmdb_query_admin in roles list. Not sure this role is deprecated or some newer roles are available to see these options in right pane.