Few strange issues found after abrupt shutdown of vCenter and related services.When you have large environment which has lot of transaction related to vCenter inventory intern any failure while updating the table value in the vCenter database cause the Virtual machines names appear as ds:///vmfs/volumes/datastore/momo

Easy steps,rename the VM as per old records.Migrate the VM vDisk and then you will get the name change.If the issue happen for bulk number of VM then you can change in DB tables.I refer the KB for the SQL datastore.

  1. On the database, use either one of these SQL queries. These queries do not make any change to the database.

    Note: You may validate using both queries

    select ENTITY.NAME, CONFIGINFO.NAME FROM
    VPX_ENTITY AS entity
    INNER JOIN VPX_VM_CONFIG_INFO AS configinfo
    ON entity.id = configinfo.id

    This query returns all the virtual machine names from the VPX_VM_CONFIG_INFO table with the associated virtual machine names found in the VPX_ENTITY table.

    All Virtual machine names should match between the columns. Each column contains the name field from the respective tables. If one row contains columns that are NOT matching, you may need to use the following SQL query.

    select ENTITY.NAME, CONFIGINFO.NAME FROM
    VPX_ENTITY AS entity
    INNER JOIN VPX_VM_CONFIG_INFO AS configinfo
    ON entity.id = configinfo.id
    WHERE ENTITY.NAME != CONFIGINFO.NAME

    This query returns all the Virtual machine names for which there is a mismatch between the VPX_VM_CONFIG_INFO and VPX_ENTITYtables. If there is no mismatch, the query does not return any row.

  2. If there is a mismatch and you are not fixing it manually, stop the vCenter Server service and run these SQL update statement to make the two tables match again:
    UPDATE
    VPX_ENTITY
    SET
    name = configinfo.name
    FROM
    VPX_ENTITY AS entity
    INNER JOIN VPX_VM_CONFIG_INFO AS configinfo
    ON entity.id = configinfo.id
    WHERE configinfo.name != entity.name

  3. Start the vCenter Server service and the virtual machines names will appear on the vCenter inventory list.

 

If it postgresql then you find the difficult in accessing the database,but there are few tutorials available in blogs which might helpful while troubleshooting.

Reference : https://kb.vmware.com/s/article/2146168

  1. http://www.vmwarearena.com/basic-commands-interact-vcsa-6-5-embedded-vpostgres-database/
  2. https://kb.vmware.com/s/article/2108848

Note: Always perform backup operation if you are going to do any changes.

Advertisements