"ds:///vmfs/volumes/datastore/vm_name" name appears for cloud-managed virtual machines
search cancel

"ds:///vmfs/volumes/datastore/vm_name" name appears for cloud-managed virtual machines

book

Article ID: 341764

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Cloud-managed virtual machine's 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 when re-registering a virtual machine. VMware recommends to use that parameter in every scenario.

For example:
New-VM -VMHost Hostname -VMFilePath DatastoreFullPath -Name VMname

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


Environment

VMware vCenter Server Appliance 6.0.x
VMware vCenter Server 6.0.x

Cause

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

This article applies to cloud-manages environments only, for other environments, see Virtual machines names appear as ds:///vmfs/volumes/datastore/vm_name

Resolution

The ds:///vmfs/volumes/datastore/vm_name issue is resolved in VMware vCenter Server 6.0 Update 3 for cloud-managed environments, available at VMware Downloads.

 



Workaround:
To work around the ds:///vmfs/volumes/datastore/vm_name 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, see, Backing 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.


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.
How to file a Support Request in Customer Connect
虚拟机名称显示为 ds:///vmfs/volumes/datastore/vm_name

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.