Skip to content

Instantly share code, notes, and snippets.

@lrivallain
Last active August 19, 2016 09:56
Show Gist options
  • Save lrivallain/e53b7ee493c01e09ef2ad4c3cb91c5c0 to your computer and use it in GitHub Desktop.
Save lrivallain/e53b7ee493c01e09ef2ad4c3cb91c5c0 to your computer and use it in GitHub Desktop.
VMware | vcenter appliance - reset inventory service database
#### Configure
VCIP="10.0.0.1"
####
# stop IS service
service vmware-inventoryservice stop
# remove old DB
rm -rf /storage/db/inventoryservice/data
# create new DB
/usr/lib/vmware-vpx/inventoryservice/scripts/ds-invoke.sh -Dvim.logdir=/var/log/vmware/vpx/inventoryservice com.vmware.vim.dataservices.CreateDb /storage/db/inventoryservice/data changeme default changeme
# restart IS service
service vmware-inventoryservice start
# check that the IS service is well running
service vmware-inventoryservice status
# re-register the vCenter Inventory Service to vCenter Server Appliance
/usr/lib/vmware-vpx/inventoryservice-registration/vcregtool.sh -Dvim.logdir=/var/log/vmware/vpx/inventoryservice-registration com.vmware.vim.dataservices.vcregtool.RegisterVC -action register -lookupserviceurl https://$VCIP:7444/lookupservice/sdk -isurl https://$VCIP:10443 -vcurl https://$VCIP/sdk/vimService -vccert /etc/vmware-vpx/ssl/rui.crt -vcprivkey /etc/vmware-vpx/ssl/rui.key -vcinstancecfg /etc/vmware-vpx/instance.cfg -vcendpointsdir /usr/lib/vmware-vpx/endpoints -vcextensionsdir /usr/lib/vmware-vpx/extensions
# restart vpxd
service vmware-vpxd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment