Enable users to re-import a global environment after removing an existing one from vRealize Suite Lifecycle Manager Inventory using API
search cancel

Enable users to re-import a global environment after removing an existing one from vRealize Suite Lifecycle Manager Inventory using API

book

Article ID: 345995

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:

  • Inventory Sync fails with error code "INVENTORY_SYNC_QUEUE_REQUEST_FAILED" and "java.util.NoSuchElementException: No value present" from /var/log/vrlcm/vmware_vrlcm.log
  • When we select the product in an environment it's does not see the product information/product primary node and it's missing or null

Environment

VMware vRealize Suite Lifecycle Manager 8.x

Cause

This can happen if the inventory sync fails due to invalid/incomplete environment information on LCM

Resolution

Remove the vIDM product from LCM inventory and then re-import it back to vRSLCM using the API call.

Workaround:

  1. Take snapshot of vRealize Suite Lifecycle Manager, VMware Identity Manager node(s) and its integrated products in the current state.
  2. In a web browser, navigate to https://vRSLCM-hostname/api/swagger-ui.html#/ and select spec as private internal API.
    Note: Replace vRSLCM-hostname with the hostname or IP Address of vRealize Suite Lifecycle Manager.
  3. Under Environment Controller, invoke the endpoint /lcm/lcops/api/v2/environments/globalenvironment/unsafe, with the following request body:
     { 

    "deleteFromInventory": true, 
    "deleteFromVcenter": false, 
    "deleteLbFromSddc": false, 
    "deleteWindowsVMs": false

      }

Screenshots below from LAB:

NOTE: Then change the deleteFromVcenter to false, we don't want to delete the VM from the vCenter as we
want to re-import the correct VIDM, that is why we need to make the changes to false.
  1. Once we go back to the vRSLCM environments dashboard, you will no longer see the global environments (VIDM), like where we can see environments but not the VIDM.
  2. Click Create Environment and Enable the toggle option for install/re-import option while creating the  environment, in next tab check the option IMPORT.
  3. Implement the Trigger inventory sync from all previous associated products to get product reference with VIDM.