How to prevent asset records being created from virtual machine CIs?

Valqe
Tera Expert

Hi all.

It appears that baseline ServiceNow configuration will create asset records [alm_asset] when new CI is created even if this CI applies to virtual machine. I'd like to better understand what are best practices to avid asset record insertion for CIs whose "Is Virtual" field value is 'true'

My two comments are:

-- I would hate to make changes in baseline business rule "Create Asset on insert"

-- In 'Hardware Category' records there is a way to set 'Asset Tracking Strategy' to 'Don't create assets' but you never know what new model category will be created in the future to prevent new hardware categories from creating new assets for virtual machines.

I would appreciate your thoughts on best practices you followed for way around to this configuration.

Thank you.

Val

1 ACCEPTED SOLUTION

You usually want to utilize "enforce CI verification" in cases when your company is allowing employees to bring their own devices. If that's the case then when ServiceNow 'Discovery' creates CIs for given devices you want to prevent assets to be created for same - therefore "enforce CI verification"

 

I did a lot of research on this topic (prevent asset creation for virtual CIs) and at the end I decided the following:

-- I will NOT modify baseline "Create Asset on insert" business rule, since it has long term implications on future instance upgrades.

-- Even if I were to modify  Create Asset on insert" BR, it will not work, because there is "Asset - Create asset delayed sync" scheduled job that will still create an asset from CI. And if I were to modify that too it would be to much to modify in the baseline.

 

So my solution was:

-- Run discovery in your DEV (or subdev) environment. Check what kind of virtual assets are being created and note their "Hardware Model" records. In my case there were two records:

1.  "VMware Virtual Platform" and

2. "VMware7,1"

-- Modify those Hardware Model records "Asset tracking strategy" to "Don't create assets"

-- Export those Hardware Records in .XML format and import them on higher instances

-- Run Discovery on higher instances and assets for hardware models that you've imported (and previously modified not to create assets) will not be created.

Unfortunately this approach will not work if you already ran discovery in higher instances because asset records have already been created.

I hope this helps

View solution in original post

12 REPLIES 12

You usually want to utilize "enforce CI verification" in cases when your company is allowing employees to bring their own devices. If that's the case then when ServiceNow 'Discovery' creates CIs for given devices you want to prevent assets to be created for same - therefore "enforce CI verification"

 

I did a lot of research on this topic (prevent asset creation for virtual CIs) and at the end I decided the following:

-- I will NOT modify baseline "Create Asset on insert" business rule, since it has long term implications on future instance upgrades.

-- Even if I were to modify  Create Asset on insert" BR, it will not work, because there is "Asset - Create asset delayed sync" scheduled job that will still create an asset from CI. And if I were to modify that too it would be to much to modify in the baseline.

 

So my solution was:

-- Run discovery in your DEV (or subdev) environment. Check what kind of virtual assets are being created and note their "Hardware Model" records. In my case there were two records:

1.  "VMware Virtual Platform" and

2. "VMware7,1"

-- Modify those Hardware Model records "Asset tracking strategy" to "Don't create assets"

-- Export those Hardware Records in .XML format and import them on higher instances

-- Run Discovery on higher instances and assets for hardware models that you've imported (and previously modified not to create assets) will not be created.

Unfortunately this approach will not work if you already ran discovery in higher instances because asset records have already been created.

I hope this helps

Hi Velon,

1st question :

Actually, Is virtual(virtual)  field in the CMDB ci is not getting populated for all the virtual classes, So how can we understand if a ci or associated asset is virtual or not for different classes.

2nd Question :

Even if we identify virtual cis and mark their corresponding asset model categories to don't create asset, (we dont know if the same model categories will be used by other hardware cis, if so they also will not create asset . secondaly we can't be sure that same model categories will be used by cloud resources  every time when the discovery runs.)at that time what would be the approach?

please respond to this as its a current issue that we have

Valon:

 

I like this solution. It still is pretty good even after two years! One thing. I would probably deploy using an update set (or even a Scoped App - and yes I realize it would only be for a couple of records). I feel that way it can be backed out using the process vs. deleting the records you have imported. Still, good answer.