Reset VMware Lifecycle Manager depot in vCenter Server Appliance 6.5/6.7/7.0/8.0/9.x
search cancel

Reset VMware Lifecycle Manager depot in vCenter Server Appliance 6.5/6.7/7.0/8.0/9.x

book

Article ID: 316581

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

The following article outlines how to reset the VMware Update Manager Depot fully on a vCenter Server Appliance 6.5/6.7 or vCenter Server 7.0/8.0/9.x; or partially reset on a vCenter Server 9.x. 

Starting with vCenter Server Appliance 6.5, the VMware Update Manager is embedded into the vCenter Server Appliance.

Environment

VMware vCenter Server 9.x
VMware vCenter Server 8.0.x
VMware vCenter Server 7.0.x
VMware vCenter Server Appliance 6.x

Cause

 

Resolution

Online Depot Reset from VMware vCenter Server 9.1+

From VMware vCenter 9.1 on, the default behavior of vLCM reset DB command is changed from full depot reset to online depot reset.

Please see the following steps:

  1. Connect to vCenter Server Appliance 6.5/6.7/7.0/8.0/9.x via SSH with root
  2. Run the shell command to switch to the BASH Shell:
    # shell

  3. Reset online depots:
    # python /usr/lib/vmware-updatemgr/bin/updatemgr-utility.py reset-db

It will show the messages below:

From vSphere 9.1 on, the default behavior of the reset-db command has changed:

   . It cleans up all online depots (including built-in and custom online depots).
   . It then syncs all online depots with the latest content.
   . This operation does not restart the vLCM service, so it will not
     interrupt any running vLCM operations.

If the default reset-db command does not resolve the depot issue, consider
these alternative solutions:

1. Reset all depots using reset-db --force:

   Caution: This is a highly destructive operation.
   It removes all online and offline depot content, including custom online
   depots, NSX, and IOFilter depots.
   Only the built-in online depot content is recovered.
   Warning: This command restarts the vLCM service, which will interrupt all
            running vLCM operations.

2. Manually delete specific problematic offline depots:

   First, identify the UUID of the problematic offline depots using the command:
       dcli com vmware esx settings depots offline list
   Then, delete them one by one using the identified UUID:
       dcli com vmware esx settings depots offline delete-task --depot <depot UUID>
   If the offline depot is currently in use, you may need to add the --force option:
      dcli com vmware esx settings depots offline delete-task --depot <depot UUID> --force true


Reset vLCM online depots ...
Please input administrator user name and password.


It will then ask for administrator credential:

Username: [email protected]
Password: ****************
Do you want to save credentials in the credstore? (y or n) [y]:n
{UUID}:com.vmware.esx.settings.depots

Please monitor the SyncDepots operation on UI or monitor the task above using dcli command:
   dcli com vmware cis tasks get --task <task id>


The administrator account name may vary on the vCenter server. Also, users can choose to save credentials for future use.


Full Depot Reset on VMware vCenter Server 6.5 or 6.7 or 7.0 or 8.0 or 9.x

Caution:  Resetting the Update Manager database is a destructive task. Custom baselines (but not Cluster Images), custom download settings and manually imported patches/ISOs will be removed and will need to be reapplied following the reset.
Before applying the steps below, please take a backup or an offline-snapshot (in powered-off state) of the vCenter Server Appliance . If the vCenter is part of a Linked Mode replication setup, please backup/snapshot all replicating nodes as well.
Furthermore, please make note of all custom configuration in Update Manager, like proxy settings, third party download URLs, customized baselines, etc. before proceeding.
  1. Connect to vCenter Server Appliance 6.5/6.7/7.0/8.0/9.x via SSH with root
  2. If not in BASH shell, switch to the BASH Shell
    shell
  3. Stop the VMware Update Manager Service
    # service-control --stop vmware-updatemgr
  4. Depending on the vCenter version, run one of the following commands to reset the VMware Update Manager Database:
    1. vCenter Server Appliance 6.5:
      # /usr/lib/vmware-updatemgr/bin/updatemgr-util reset-db
    2. vCenter Server Appliance 6.7/7.0/8.0/9.0:
      # python /usr/lib/vmware-updatemgr/bin/updatemgr-utility.py reset-db
    3. In vCenter Server Appliance 9.1 and on:
      #  python /usr/lib/vmware-updatemgr/bin/updatemgr-utility.py reset-db --force


  5. Run the following Command to delete the contents of the VMware Update Manager Patch Store:

    # rm -rf /storage/updatemgr/patch-store/*
  6. Start the VMware Update Manager Service
    # service-control --start vmware-updatemgr
Notes
  • Logging out and back into the vSphere Web Client may be required to see the change.
  • For vSAN environments, this will also remove the vSAN default baselines. These baselines are re-created automatically when there is a configuration change to vSAN such as add/remove a host/disk or an update to the HCL DB. The vSAN cluster can still be updated without the vSAN default baselines.
  • Since the new "download token"-based URLs are considered custom URLs, they will need to be re-added after the reset. Refer to KB VCF authenticated downloads configuration update instructions to update the necessary systems. 

Workaround

To reset the Update Manager database if NSX-T is installed in a vLCM-enabled cluster (applicable for vCenter Server Appliance 7.0 U1 and beyond).

Note : The following additional steps are NOT required in case of NSX-V.

After running the reset-db script, perform the following steps.

  1. Create an empty vLCM-enabled cluster
    1. Log into vCenter
    2. Right click on vCenter in the Inventory tab.
    3. Click New Cluster
    4. Make sure to select "Import image from existing host" to avoid having to add a host to the cluster.
  2. From the NSX Manager UI, configure NSX on the cluster created in step 1. This will ensure the NSX depot gets uploaded to the VC again.
    1. In the NSX UI, go to the Hosts and Clusters tab.
    2. Locate the new empty cluster and check the box next to it.
    3. Click Add NSX at the top. Select the Transport Node Profile to use. This does NOT affect live traffic as the cluster is an empty cluster.
  3. The cluster created in step 1 can now be deleted. After the related tasks in vCenter show complete.

The NSX depot gets uploaded to vCenter when NSX is configured on a vLCM cluster only if the depot is not already present. So, if the reset-db script removes this depot from vCenter, then this depot can be uploaded again by creating an empty vLCM cluster and enabling NSX on that cluster.

Additional Information

Impact/Risks:
For environments where NSX-T is deployed, resetting the VMware Update Manager database will result in clusters configured with vLCM cluster images (steady-state clusters) to be unable to save or validate the image associated with them. 
Do not reset the VMware Update Manager database if NSX-T is installed on a cluster where a cluster image is configured without the help of VMware Support.