How the "Is Virtual" field gets populated using discover?

devyani-laxmi
Tera Expert

 How the "Is Virtual" field gets populated using discovery?Is it different for different classes, checked in the business rules "Virtual Computer Check" but still not able to identify from where it gets checked.

1 ACCEPTED SOLUTION

devyani-laxmi
Tera Expert

Hi,

 There is an OOB Business Rule 'Virtual Computer Check', which sets the 'Is Virtual' field. It only handles Solaris, VMware and Hyper V servers. In order for it to handle other Virtual servers types, like AIX and HP UX servers, users may need to create a new business rule with a similar format or modify the existing business rule based on their requirement.

The above is the reply from th Service now HI team.

Thanks for the help

Regards,

Devyani

View solution in original post

5 REPLIES 5

Dave Ainsworth
ServiceNow Employee
ServiceNow Employee

Hi,

In the Virtual Computer Check Business Rule around line 30 (in Kingston) where there is:

current.virtual = true

Before this, the code checks it is one one the virtualisation types that discovery recognises and returns out of the function if it doesn’t. If it does recognise it then it will set the value above.

Note that some patterns now set this as well so the Business Rule is not the only place. As an example the Windows OS - servers pattern in Kingston sets the virtual flag if it finds a virtual server is hosted on Azure or EC2:

find_real_file.png

 

Regards,


Dave

Hi David,

Thanks for the reply.

i am still not sure how to identify for the CI's what is missing as before setting as virtual true it is checking the below parameters

 

function startVirtualComputerCheck() {
// Putting the easier ones to identify at the front so we don't spend extra effort looking up the others
if (isSolarisZone())
handleSolariZone();
else if (isVMWare()) {
// only process rec if just inserted or serial_number changed AND serial_number is non-nil
if (!(current.serial_number.changes() && JSUtil.notNil(current.serial_number)))
return;

handleVMWare();
} else if (isHyperV())
handleHyperV();
else
return;

 

Regards,

Devyani Laxmi

Hi Devyani,

If you look further down in the Business Rule, you can see some examples of what it is checking, for example, to determine if it is a VMware virtual machine, it checks the serial number to see if it starts with 'vmware':

	function isVMWare(){
		if (!fVMGr.serial_number.hasValue())
			return false;
			
		if (!fVMGr.serial_number.toLowerCase().startsWith("vmware-"))
			return false;		
		
		return true;

 

Are you finding some devices not being set as virtual? If so, do you have an example?

Regards,

Dave

Hi david,

I have a server "RTPLWBPVCMS07" of  class as linux server.

this is not identifying as virtual

 

Thanks,

Devyani Laxmi