Purging data from the VMware vCenter Server 5.5 Inventory Service's Individual Data Providers
search cancel

Purging data from the VMware vCenter Server 5.5 Inventory Service's Individual Data Providers

book

Article ID: 341731

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article provides steps to reset the Individual Data Providers in the Inventory Service.



Symptoms:
  • Cannot search the objects within the vSphere Web Client or vSphere Client to the vCenter Server
  • Cannot view the Inventory in the vSphere Web Client
  • The hardware monitoring service on the host is not responding or is not available
  • The Common Information Model (CIM) agent requires a restart on the host to update the Hardware tab


Environment

VMware vCenter Server 5.5.x
VMware vCenter Server Appliance 5.5.x

Resolution

Starting with vCenter Server and vCenter Server Appliance 5.5 Update 3 there is now the ability to purge data from individual Data providers. Using this method also ensures that Tags, Storage Profiles, Storage Policies, and tie-ins from vCenter Site Recovery Manager or vCloud Director stay intact. After resetting providers, there may be a noticeable delay with content propagating in the vSphere Web Client as objects are synchronized.

Caution:
  • Executing the PurgeProviders.bat command or the ./ds-invoke.sh script with the vpx switch purges any stale data related to VPX data.
  • Executing the PurgeProviders.bat command or the ./ds-invoke.sh script with the cms switch purges any stale data related to hardware status related data.

Windows vCenter Server:
  1. Log in to the vCenter Server server using an administrative user.
  2. Stop the VMware Inventory Server service. For more information, see Stopping, starting, or restarting VMware vCenter Server services (1003895).
  3. Click Start > Run, type cmd and press OK.
  4. Navigate to C:\Program Files\VMware\Infrastructure\Inventory Service\scripts.
  5. Run this command to backup the Inventory Service database:

    backup.bat -file backup.bak

    For Example:

    backup.bat -file ISDB_backup.bak

    You see output similar to:

    [2015-09-21 12:53:08,321 main INFO com.vmware.vim.dataservices.BackupDb] Starting Inventory Service backup script
    [2015-09-21 12:53:08,431 main INFO com.vmware.vim.dataservices.BackupDb] Backing up Inventory Service data to: C:\Program Files\VMware\Infrastructure\Inventory Service\scripts\ISbackup.bak
    [2015-09-21 12:53:08,510 main INFO com.vmware.vim.dataservices.BackupDb] Connecting to Inventory Service...
    [2015-09-21 12:53:12,577 main INFO com.vmware.vim.dataservices.BackupDb] Opening Inventory Service data files
    [2015-09-21 12:53:14,379 main INFO com.vmware.vim.dataservices.BackupDb] Inventory Service data files opened
    [2015-09-21 12:53:14,380 main INFO com.vmware.vim.dataservices.BackupDb] Backing up data...
    [2015-09-21 12:53:15,094 main INFO com.vmware.vim.dataservices.BackupDb] Backup completed successfully

    Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

  6. Run the PurgeProviders.bat command with the VPX and CMS switches to clear the provider data. Executing VPX purges any stale data related to VPX data. Executing CMS purges any stale data related to hardware status related data.

    For example:

    PurgeProviders.bat purge.xml vpx

    PurgeProviders.bat purge.xml cms

  7. Start the VMware Inventory Server service.
  8. Log in to the vSphere Web Client and verify that inventory items such as virtual machines, Resource Pools, and clusters are still visible.
vCenter Server appliance:
  1. Open a console or connect using SSH to the vCenter Server Appliance using the root credentials.
  2. Stop the inventory service by running this command:

    service vmware-inventoryservice stop

  3. Navigate to the directory /usr/lib/vmware-vpx/inventoryservice/scripts/ by running this command:

    cd /usr/lib/vmware-vpx/inventoryservice/scripts/

  4. Run this command to backup the Inventory Service database:

    ./backup.sh -file backup.bak

    For example:

    ./backup.sh -file ISDB.bak

    You see output similar to:

    Opening Inventory Service data files
    Inventory Service data files opened
    Backing up data...
    Backup completed successfully

  5. Run the ./ds-invoke.sh command and the vpx and cms switches to clear the provider data. Executing vpx purges any stale data related to VPX data. Executing cms purges any stale data related to hardware status related data.

    For example:

    ./ds-invoke.sh -Dvim.logdir=/var/log/vmware/vpx/inventoryservice com.vmware.vim.dataservices.PurgeProviders purge.xml vpx

    ./ds-invoke.sh -Dvim.logdir=/var/log/vmware/vpx/inventoryservice com.vmware.vim.dataservices.PurgeProviders purge.xml cms

  6. Start the Inventory Service by running the command:

    service vmware-inventoryservice start

  7. Log in to the vSphere Web Client and verify that inventory items such as virtual machines, Resource Pools, and clusters are still visible.


Additional Information

How to stop, start, or restart vCenter Server services
Resetting the VMware vCenter Server 5.x Inventory Service database
Resetting the VMware vCenter Server 6.0 Inventory Service's Individual Data Providers
VMware vCenter Server 5.5 Inventory Service の個別のデータ プロバイダからのデータの消去