Notifications

23 views

Description

Whenever the Vcenter instance relationship is deleted on the Windows/Linux device,the Discovery does not create the relationship again.However when we delete the CI and run the discovery on the same CI IP .The relationship between Windows and Vmware instance gets created.

Release or Environment

Orlando

Cause

  • When a Windows Server is discovered then the business rule with name "Virtual Computer Check" is triggered, which would creates the relationship between Server CI and VM Instance record.
  • The most important thing is once the relationship is established, the Server CI's field whose name is "Is Virtual" is update "True" ,but in some cases discovery may not create the relationship again.

Resolution

  • WAY1:

>Reset the respective flags value to "False" of respective CIs (Server CI and VM Instance CI). To do that go to the respective Server CI and VMWare Instance CI records and set the fields to "False" i.e., "Guest Reconciled" field value to "False" for VMWare Instance CI Record (Entry in "cmdb_ci_vmware_instance")

>Set "Is Virtual" field value to "False" for Server CI record (Entry in "cmdb_ci_win_server" or "cmdb_ci_linux_server" depending on the CI).

https://instancename.service-now.com/sys_dictionary_list.do?sysparm_query=name%3Dcmdb_ci_win_server%5Eelement%3Dvirtual&sysparm_first_row=1&sysparm_view=

>Rerun the discovery (first the Server CI and if that established the relationship then ignore to run the discovery on VMWare)

  • WAY2:

>If those fields are read-only go to the respective dictionary entries (Provided the URLs below) and set the "Read Only" to "False" and Do WAY1.

https://instanename.service-now.com/sys_dictionary_list.do?sysparm_query=name%3Dcmdb_ci_vmware_instance%5Eelement%3Dguest_reconciled&sysparm_first_row=1&sysparm_view=

  • WAY3:

>Go to the Background Scripts => run below queries => Rerun the discovery (first the Server CI and if that established the relationship then ignore to run the discovery on VMWare)

> https://Instancename.service-now.com/sys.scripts.do
-----------
// To update the Server CI Records
var serverCIsSysIDsList = []; // Provide comma separated values and each enclosed in quotes (Single or Double is fine)
var serverCIGr = new GlideRecord('cmdb_ci_win_server');
serverCIGr.addQuery('sys_id', 'IN', serverCIsSysIDsList);
serverCIGr.query();
while (serverCIGr.next()) {
serverCIGr.virtual = false;
serverCIGr.update();
}

// To update the VM Instance CI Records
var vmInstanceSysIDsList = []; // Provide comma separated values and each enclosed in quotes (Single or Double is fine)
var vmCIGR = new GlideRecord('cmdb_ci_vmware_instance');
vmCIGR.addQuery('sys_id', 'IN', vmInstanceSysIDsList);
vmCIGR.query();
while (vmCIGR.next()) {
vmCIGR.guest_reconciled = false;
vmCIGR.update();
}
-------

Additional Information

NOTE:Technical Support doesn't recommend to delete the relationships manually because that sort of use case is nothing but a customisation or data modification more or less. The proper and right way to deal with this sort of use case is to of-course delete the respective CIs and run the discovery so that discovery process which will establish the relationships properly instead of manual intervention.

Article Information

Last Updated:2020-10-21 00:49:32
Published:2020-10-06