AjaykumarPatil
Active participant

VM Host Cleanup

Jump to solution

Hi,

We are having agentless Vmware Inavtory based on API which pulls data from vCenters, apparently, there are number VM hosts we have seen which inventoried log back still those are present in All inventory. I have the below queries on that.

  1. Will automatically purged from All inventory?
  2. If yes, then what is the time frame after it gets purged.
  3. If not, then do we have any mechanism to remove/delete it or need to delete it manually.

My thought is if we removing any Vcenter from the Inventory rule then related all hosts must have removed themselves automatically.

Your thoughts pls. 

0 Kudos
1 Solution

Accepted Solutions
mfranz
Shining star

Re: VM Host Cleanup

Jump to solution

Hi,

Please change the 90 days as needed. And please be aware what you're doing.

USE FNMSInventory

SELECT ir.ComputerID
INTO #Computer
FROM InventoryReport ir
WHERE DATEDIFF(DAY, COALESCE(SWDate,HWDate,VMWareServicesDate), GETDATE()) > 90

EXEC ComputerRemoveBatch

Best regards,

Markward 

Softline Group is Europe's leading independent expert in Software Asset Management.

View solution in original post

3 Replies
mfranz
Shining star

Re: VM Host Cleanup

Jump to solution

Hi,

  1. As far as I know, there is no automatic process taking care of this.
  2. See 1.
  3. We usually do run a Business Import with some custom SQL to remove anything older than 90 days or something from the innventory database. ComputerRemoveBatch would be the Stored Procedure to look at, and tables Computer and InventoryReport.

Well, the resulting inventory is not linked to your inventory rule. So, removing the vCenter shouldn't change anything.

Best regards,

Ma rkward

Softline Group is Europe's leading independent expert in Software Asset Management.
AjaykumarPatil
Active participant

Re: VM Host Cleanup

Jump to solution
@mfranz, Will you please help me with the SQL queries or any procedure document for deleting those old records.
0 Kudos
mfranz
Shining star

Re: VM Host Cleanup

Jump to solution

Hi,

Please change the 90 days as needed. And please be aware what you're doing.

USE FNMSInventory

SELECT ir.ComputerID
INTO #Computer
FROM InventoryReport ir
WHERE DATEDIFF(DAY, COALESCE(SWDate,HWDate,VMWareServicesDate), GETDATE()) > 90

EXEC ComputerRemoveBatch

Best regards,

Markward 

Softline Group is Europe's leading independent expert in Software Asset Management.

View solution in original post