- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 11:40 PM
Hi All,
We have few CI's which are marked as "Is virtual=true" by Discovery and there is no relationship created to host. Please let me know how to troubleshoot further. What kind of relationship will it create for Different server? Like Windows, Linux & AIX.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 01:23 AM
Hey,
This is pretty common and works as it should. The way the discovery of virtual machines (or any virtualized hardware) works is twofold:
1) Discovery of the virtualized hardware
The "normal" horizontal discovery will find virtualized objects within your infrastructure and create those accordingly. The discovery itself will always work bottom-up (contrary to the service mapping which works top-down). This leads to the initial host to be "the bottom". In this case, this is the virtualized server. The discovery will only inventorize whats running on the server and what it connects to. It treats virtualized servers the same way as "normal", non-virtualized servers.
2) Discovery of virtualizing hardware/software (e.g. VMWare)
Part of the discovery will also be the discovery of a server which is running a virtualizing management system (e.g. VMWare). Again, bottom-up. Ergo, the server is discovered, then the discovery will find VCenter running on it (to stick with the example) and discover that. Then the VCenter discovery is triggered, which uses the VCenter management API to inventorize the virtualizing structure.
Part of that discovery via the API is also creating vm instance records as CIs. IF there is a matching server record (in the cmdb_ci_server table) a relationship will be created through this step.
This is also true for other virtualizing systems (and also for cloud discovery).
You will always need both of these steps to work. The second step will usually then create the relationship. The reason why the first one doesn't is due to information for the virtualizing infrastructure not being available through the host discovery itself but rather only through discovering the virtualizing or managing host(s).
In your case make sure, that the discovery is also able to discovery the servers for your management system and has the additional credentials to discover the virtualization system.
Hope this helps
Regards
Fabian
ps.: To find out what you need, the documentation regarding the discovery is product specific and in depth. E.g. you will be able to find how to discovery VMWare by checking the documentation from ServiceNow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 10:37 PM - edited 01-09-2024 10:39 PM
Yes You Can play with it.
fetch XLS for List of Servers where Virtual Flag=Y
Now Open CMDB_REL_CI table and search In Parent CI table And Then Child CI table . CIs with No matching with Parent or Child in CMDB_REL_CI table are your LIST which you are looking for. Same can be achieved using a Background Script to..
Or if you have CMDB Health Dashboard - You can look for Orphan Server CIs
Regards
RP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 11:35 PM
Hey,
Yes, this is best done with the service query builder. There are some examples here. What you are looking for are all servers with the virtual flag set to true which DO NOT have a relationship with a VM instance (cmdb_ci_vm_instance). There is an example on how to do "does not have a relationship" queries here.
Just make sure, that you specify in the relationship, that the server is the parent and the vm instance is the child. Per default, this will be the other way around.
You can then run that query and even have it scheduled to make sure you can use it as a report base.
Next step - if you want to go that far - is to create a cmdb desired state audit. There you can create a filter for the servers in question (virtual flag is true) and add a certification check which makes sure that there is a relationship present with a vm instance. This can then be setup to create follow-up tasks to make sure someone actually maintains it.
Regards
Fabian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 12:59 AM
Hi @Fabian Kunzke ,@rahul
Thank you so much for your response. For Vmware , i understand that the guest VM(Windows or Linux) should either have Virtualize:: Virtualized by relationship with an ESX server or Instantiates::Instantiated by with a vmware instance. If either relationship is not found we can consider it as virtual with no relationship to host.
I'm seeing few Microsoft, HP and Google servers in the list of servers with Is virtual flag true and no relationship. What should be the relationship i should look for them to consider as not related to its host?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 04:27 AM
Detailed Are also given and explained in this KB..
Host/OS Discovery
Vmware Vcenter Discovery and Relationships.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0813327
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0864549
Regards
RP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 12:15 AM
Hi @Suvetha S ,
The easiest solution is discover the VMware/Hyperv etx in 1st step and then discovered the Host Like Linux, Windows etc..
automatically relationship will be created by ServiceNow, if you still face the relationship error you can debug the pattern for that.
Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Ajay Kumar