Search the VMware Knowledge Base (KB)
View by Article ID

Virtual machines names appear as ds:///vmfs/volumes/datastore/vm_name (2146168)

  • 4 Ratings
Language Editions

Symptoms

  • Virtual machines name appears with the location of storage: 
    ds:///vmfs/volumes/datastore/vm_name

  • This issue happens when re-registering virtual machines using the PowerCLI command:
    New-VM -VMHost Hostname -VMFilePath DatastoreFullPath
    Note:
  • The parameter Name is optional per VMware documentation when re-registering a virtual machine. VMware recommends to use that parameter in every scenario:
    New-VM -VMHost Hostname -VMFilePath DatastoreFullPath -Name VMname

  • If this command was not used, it may occur in vCenter Server after an upgrade.

Cause

This issue occurs due to a mismatch between tables in the vCenter Server database.

Resolution

This issue is resolved in VMware vCenter Server 6.0 Update 3, available at VMware Downloads.

To work around this issue, use any one of these options:
  • Rename the affected virtual machine name manually.
  • Migrating the affected virtual machines will restore the name.
  • If the number of affected virtual machines is high, perform these steps.
In larger environments, it may be difficult to identify all of the affected virtual machines. This method can be used to compare the two tables mentioned:
Note: Ensure to take full database backup before proceeding with the steps. For more information, seeBacking up the vCenter Server database running on Microsoft SQL or SQL Express server (2012138)
  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_ENTITY tables. 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.

Note: If you encounter this issue with embedded Postgres database (vCenter Server Appliance and vCenter Server for Windows with embedded Postgres database). File a support request with VMware Support and note this KB article ID (2146168) in the problem description. For more information, see How to File a Support Request.

Impact/Risks

  • Before doing this procedure, make sure you have a full database backup.
  • This procedure is low risk, but can be reverted by restoring the backup.

Additional Information

Note: The preceding links were correct as of August 26, 2016. If you find a link is broken, please provide feedback and a VMware employee will update the link.

See Also

Update History

2/24/2017 – Updated Resolution with vCenter 6.0 U3 fix.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 4 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 4 Ratings
Actions
KB: