Disable discovery of all VMs when using vmware probe
search cancel

Disable discovery of all VMs when using vmware probe

book

Article ID: 12278

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM) CA Unified Infrastructure Management On-Premise (Nimsoft / UIM) CA Unified Infrastructure Management SaaS (Nimsoft / UIM)

Issue/Introduction

Is there an option to disable the discovery of the VM’s when using the vmware probe if I wish to monitor only the vCenter, ESX hosts, and Datastores and not the VM's?

Environment

  • DX UIM 23.4.*
  • Vmware probe 8.* and later

Cause

  • Configuration guidance

Resolution

Disable VMs Discovery:

  • The ‘show_vms' raw configure key controls whether the vmware probe publishes guests to discovery_server.

    Steps: 

      1. Open the vmware probe Raw Configure:
         
      2. Add the show_vms key to the 'setup' section with 'false' or 'no' as the value.




      3. After setting the key, if you create a profile in vmware configuration page in AC you will not see VM’s discovered in the configuration.



Remove Existing VMs:


When the above setting is in place, the VMs will no longer being added to the inventory, however, the VMs that were discovered before, will still be present.

  • Remove Existing VMs

If you still see the VM in OC, you may need to delete the VM by using the discovery_server probe utility.

First, you need to query the cm_computer_system table to get the cs_key value of the VM(s).

    select cs_key from cm_computer_system where name = <vm_name>;

Then, on your primary hub perform the following steps.

    1. Select the discovery_server probe and press Ctrl-P from your keyboard

    2. In the probe utility, select 'remove_master_devices_by_cskeys'

    3. On the bottom of the probe utility (PU) GUI you will see the csKeys input box. On this input box place each affected robot's 'cskey' separated by comma's, for example-> 26a1,25b6,257c

    4. Press the green (arrow) play button on the PU and it will execute the command.

    5. Then restart the wasp and the discovery_server and log back into OC and the VMs should be removed from the OC view.



 

Remove existing VMs in bulk:


If you have hundreds or thousands of VMs to remove, The quickest and clean way is the following:

  1. Identify a list of VMs in the Inventory that are marked with dedicated = 'VirtualMachine' while they also do NOT have a robot installed on it. (Pure "VMs only" scenario clean up):
SELECT STRING_AGG(CAST(ccs.cs_id AS VARCHAR(MAX)), ',') AS cs_id_list
FROM cm_computer_system ccs
WHERE ccs.dedicated = 'VirtualMachine'
AND NOT EXISTS (SELECT 1 FROM cm_nimbus_robot cnr WHERE ccs.name LIKE '%' + cnr.robot + '%' OR cnr.robot LIKE '%' + ccs.name + '%');

     2. Using the discovery_server 'remove_master_devices_by_cs_ids' callback, copy the comma separated list (up to 2k+ devices) and use the
         discovery_server to delete them all.