Virtual machines appear as unknown in Inventory on host and invalid in vCenter Server
search cancel

Virtual machines appear as unknown in Inventory on host and invalid in vCenter Server

book

Article ID: 316524

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • vSphere Client direct to host show virtual machine(s) as unknown.
  • The vSphere Client connected to vCenter Server shows virtual machine(s) as invalid.
  • No errors on storage or on vmkwarning.
  • All the virtual machines on the host are functional and responding.


Environment

VMware vSphere ESXi 5.5
VMware ESXi 3.5.x Embedded
VMware ESXi 4.1.x Embedded
VMware vCenter Server 4.1.x
VMware vSphere ESXi 5.0
VMware ESXi 4.0.x Installable
VMware ESXi 3.5.x Installable
VMware vSphere ESXi 5.1
VMware vCenter Server 5.5.x
VMware ESX 4.1.x
VMware ESXi 4.0.x Embedded
VMware vCenter Server 6.0.x
VMware ESXi 4.1.x Installable
VMware vCenter Server 5.0.x
VMware ESX 4.0.x
VMware vSphere ESXi 6.0
VMware vCenter Server 4.0.x
VMware vCenter Server Appliance 5.5.x
VMware vCenter Server 5.1.x

Resolution

To resolve this issue:
 
For ESXi 3.5, 4.x, 5.x, 6.x
  1. Log in to the VMware ESX/ESXi host as the root user. For more information on VMware ESXi 4.1 and ESXi 5.x Technical Support Mode, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910)
  2. To list all running virtual machines and their corresponding VMIDs, run these commands:

    vim-cmd vmsvc/getallvms
    cd /etc/vmware/hostd/

     
  3. Make a copy of vmInventory.xml file by running this command:

    cp vmInventory.xml vmInventory.xml.bak

     
  4. Stop the vpxa and hostd services by running these commands:

    /etc/init.d/vpxa stop
    /etc/init.d/hostd stop

     
  5. Rename the vmInventory.xml file by running this command:

    Note: This action unregisters all virtual machines from the host.

    mv vmInventory.xml vmInventory_xml.bak
     
  6. Start the vpxa and hostd services by running these commands:

    /etc/init.d/vpxa start
    /etc/init.d/hostd start

     
  7. Log in to vSphere Client and verify that the virtual machine Inventory is now displayed as blank.
  8. Use this command to register every virtual machine back to Inventory on the host:

    vim-cmd solo/registervmfull_path_of_VMX

    For Example: vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx
     


Additional Information



Virtual machines appear as invalid or orphaned in vCenter Server
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x
仮想マシンがホスト上のインベントリに不明と表示され、vCenter Server には無効と表示される
虚拟机在主机的清单中显示为未知并在 vCenter Server 中显示为无效