How to reset Inventory Service database for vCenter Server 6.0
search cancel

How to reset Inventory Service database for vCenter Server 6.0

book

Article ID: 313926

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article provide steps to reset the Inventory Service database for vCenter Server 6.0 installed on Microsoft Windows. This involves creating the fresh Inventory Service database and re-registering Inventory Service with Component Manager.


Environment

VMware vCenter Server 6.0.x

Resolution


Cautions:
  • Resetting the Inventory Service database is destructive. Ensure you reset the database only after resetting the Individual Data Providers in the Inventory Service.
  • If you reset the Inventory Service database
    • vCloud Director goes out of sync with vCenter Server and does not have accurate information about managed virtual machines.
    • Any Storage Profiles that you are using through the vSphere Profile-Driven Storage service are lost.
    • All object tags are deleted during a reset.
    • If the vCenter Server environment has Site Recovery Manager and you reset the Inventory Service database, you need to run a Change/Modify and Repair on Site Recovery Manager from the Windows Programs and Features to re-register Site Recovery Manager with the vCenter Server and Inventory Service.
       

To reset the Inventory Service database:
  1. Create a fresh Inventory Service database.
  2. Re-register the Inventory Service with the Component Manager.

Note: If you installed vCenter Server in a non-default location, replace the environmental variables in the commands below with the full path in which vCenter Server was installed.

Alternatively, download the attached 2119422_6.0-ISDB-Reset-PS1.zip, extract the files and run the 2146264_Reset-ISDB6.0.ps1 powershell script as administrator to reset the Inventory Service database.

Caution:  Do not skip any of these steps.

Creating a fresh Inventory Service Database    
    
Create a snapshot or backup of the vCenter Server.  
 
  1. Download 2119422_reset-isdb6.0-bundle.zip file attached to this article and extract it on the vCenter Server machine.

    Note: The  createdb.bat and  exec.bat are available by default in vCenter Server Update 2 and later.
     
  2. On the Management/Embedded Node stop these services in order:

    Note: The Services under the bullet points is shut down by stopping the main service. 
     
    1. VMware vSphere Web Client  

      VMware Performance Charts
       
    2. VMware VirtualCenter Server
      • VMware vService Manager
      • VMware vCenter workflow manager
      • VMware Syslog Collector
      • VMware vSphere Profile-Driven Storage Service
      • VMware Content Library Service
      • VMware ESX Agent Manager
         
    3. VMware Inventory Service
       
  3. Navigate to the %PROGRAMFILES\VMware\vCenter Server\invsvc\scripts folder.
  4. Backup the createdb.bat and exec.bat files.
  5. Copy the  createdb.bat and  exec.bat files from the extracted  2119422_reset-isdb6.0-bundle.zip file to  %PROGRAMFILES%\VMware\vCenter Server\invsvc\scripts.
  6. Open  %PROGRAMFILES%\VMware\vCenter Server\invsvc\lib\server\config\dataservice.properties file using a text editor.
  7. Look for the   dataservice.xdb.password entry and remove any special characters, except the @ signs.

    For example:

    dataservice.xdb.password=cSIOMV*)2>=$EGvg

    to

    dataservice.xdb.password=cSIOMV2EGvg
     
  8. Look for the  dataservice.xdb.dir entry and change the instances of \ to /.

    For example:

    dataservice.xdb.dir=C:\ProgramData\VMware\vCenterServer\data\invsvc\xdb

    to

    dataservice.xdb.dir=C:/ProgramData/VMware/vCenterServer/data/invsvc/xdb
     
  9. Leave this file open as it will be used later.
  10. Open the %PROGRAMFILES%\VMware\vCenter Server\vpxd\endpoints\qs-endpoint.xml file in a plain text editor.
  11. Find the <instanceUuid> Tag.
    For example:

    <instanceUuid>1c9f5ff7-c844-45d1-bf62-a4e9c0860a57</instanceUuid>
     
  12. Copy the content between  <instanceUuid> and </instanceUuid>:
    From the example in Step 11 this will be:

    1c9f5ff7-c844-45d1-bf62-a4e9c0860a57
     
  13. Return to the dataservice.properties file and create the  dataservice.instanceuuid entry and add the UUID from step 12.

    For example:

    dataservice.instanceuuid=1c9f5ff7-c844-45d1-bf62-a4e9c0860a57
     
  14. Save and close the dataservice.properties file.
  15. Navigate to %PROGRAMDATA%\VMware\vCenterServer\data\invsvc.
  16. Rename the xdb folder to xdb.old.
  17. Click Start > run, type cmd and press OK. The Command Prompt window opens.
  18. Navigate to %PROGRAMFILES%\VMware\vCenter Server\invsvc\scripts.
  19. Type createdb.bat and press Enter.

Re-registering Inventory Service with Component Manager    

  1. Navigate to %PROGRAMFILES%\VMware\vCenter Server\vpxd\inventoryservice-registration.
  2. Move these files to a backup folder:
    • register-is.bat
    • vcregtool.bat
    • GetAppDataDir.vbs

      Note: Some or all the files may not exist.

       
  3. Copy register-is.bat, vcregtool.bat, and GetAppDataDir.vbs from the extracted from the 2119422_ reset-isdb6.0-bundle.zip to %PROGRAMFILES%\VMware\vCenter Server\vpxd\inventoryservice-registration\.
  4. Navigate to %PROGRAMDATA%\VMware\vCenterServer\.
  5. Create a folder ssl.
  6. Return to the command prompt from the previous section and navigate to %PROGRAMFILES%\vmware\vcenter server\vmafdd\.
  7. Run these commands:
     
    • vecs-cli.exe entry getkey --store vpxd --alias vpxd --output %PROGRAMDATA%\VMware\vCenterServer\ssl\rui.key
    • vecs-cli.exe entry getcert --store vpxd --alias vpxd --output %PROGRAMDATA%\VMware\vCenterServer\ssl\rui.crt
       
  8. Start these services in the order listed:
    • VMware Inventory Service
    • VMware VirtualCenter Server
       
  9. Open %PROGRAMFILES%\VMware\vCenter Server\invsvc\lib\server\config\dataservice.properties file using a text editor.
  10. Find the entry dataservice.cm.url=.

    For example:

    dataservice.cm.url=http://localhost:18090/cm/sdk/?hostid=d820e6b0-c730-11e4-bddf-005056031f43
     
  11. Copy the url after dataservice.cm.url=.

    Example from step 10:

    http://localhost:18090/cm/sdk/?hostid=d820e6b0-c730-11e4-bddf-005056031f43
     
  12. Return to the command prompt and navigate to %PROGRAMFILES%\VMware\vCenter Server\vpxd\inventoryservice-registration.
  13. Run this registration command using the url copied from Step 11:

    register-is.bat "dataservice.cm.url "http://localhost:8095

    For example:

    register-is.bat "http://localhost:18090/cm/sdk/?hostid=d820e6b0-c730-11e4-bddf-005056031f43" http://localhost:8095
     
  14. Start the following Services in the order listed:
     
    1. VMware ESX Agent Manager
    2. VMware Content Library Service
    3. VMware vSphere Profile-Driven Storage Service
    4. VMware Syslog Collector
    5. VMware vCenter workflow manager
    6. VMware vService Manager
    7. VMware vSphere Web Client
    8. VMware Performance Charts
 


Additional Information

End of General Support for vSphere 6.0

Inventory Service fails to start in vCenter Server 6.x
如何为 vCenter Server 重置 Inventory Service 数据库
vCenter Server の Inventory Service データベースのリセット方法

Attachments

2119422_6.0-ISDB-Reset-PS1.zip get_app
2119422_reset-isdb6.0-bundle.zip get_app