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:
- Log in to the vCenter Server server using an administrative user.
- Stop the VMware Inventory Server service. For more information, see Stopping, starting, or restarting VMware vCenter Server services (1003895).
- Click Start > Run, type cmd and press OK.
- Navigate to C:\Program Files\VMware\Infrastructure\Inventory Service\scripts.
- 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.
- 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
- Start the VMware Inventory Server service.
- 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:
- Open a console or connect using SSH to the vCenter Server Appliance using the root credentials.
- Stop the inventory service by running this command:
service vmware-inventoryservice stop
- Navigate to the directory /usr/lib/vmware-vpx/inventoryservice/scripts/ by running this command:
cd /usr/lib/vmware-vpx/inventoryservice/scripts/
- 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
- 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
- Start the Inventory Service by running the command:
service vmware-inventoryservice start
- Log in to the vSphere Web Client and verify that inventory items such as virtual machines, Resource Pools, and clusters are still visible.