Re-registering orphaned virtual machines
search cancel

Re-registering orphaned virtual machines

book

Article ID: 308078

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • Virtual machines that are running and fully functional in vCenter Server do not display correctly in the Inventory view of the ESX/ESXi host on which they are registered.
  • Virtual machines appear in an Orphaned state in vCenter Server.
  • Removing the host from vCenter Server does not resolve the Orphaned state.
  • The vm-support -x command does not contain all of the virtual machine's registered on the host.
  • When the host is re-added to inventory, vCenter Server reports this error:

    Not enough licenses to perform this operation

  • The vCenter Server log file contains this error from Licmgr:

    Bad host information for host

  • The vpxa.log file on the ESX host contains the error:

    [2008-11-05 15:13:52.869 'App' 7490480 warning] ============BEGIN FAILED METHOD CALL DUMP============
    [2008-11-05 15:13:52.870 'App' 7490480 warning] Invoking [GetLayout] on [vim.VirtualMachine:10496]
    [2008-11-05 15:13:52.870 'App' 7490480 warning] Fault Msg: "A general system error occurred: Failed to serialize result"
    [2008-11-05 15:13:52.870 'App' 7490480 warning] ============END FAILED METHOD CALL DUMP============


Environment

VMware ESXi 4.1.x Installable
VMware vSphere ESXi 5.0
VMware vCenter Server 5.1.x
VMware vSphere ESXi 5.5
VMware ESXi 4.1.x Embedded
VMware vCenter Server 4.1.x
VMware VirtualCenter 2.5.x
VMware VirtualCenter 2.0.x
VMware vSphere ESXi 5.1
VMware vCenter Server 5.5.x
VMware ESXi 3.5.x Installable
VMware ESXi 4.0.x Embedded
VMware ESXi 4.0.x Installable
VMware ESXi 3.5.x Embedded
VMware ESX 4.1.x
VMware ESX Server 3.5.x
VMware ESX Server 3.0.x
VMware vCenter Server 4.0.x
VMware vCenter Server 5.0.x
VMware ESX 4.0.x

Cause

This issue may be caused by a corrupt inventory file on the ESX host.

Resolution

To clear the existing host inventory and re-register the orphaned virtual machines on the affected host:
  1. Open the VMware Infrastructure Client (VI) and connect to vCenter Server with administrative privileges.
  2. Attempt to register the virtual machine manually.

    For more information see, Registering or adding a virtual machine to the inventory (1006160). If the operation fails, proceed to the next step.


  3. Put the host into maintenance mode. For more information, see Place a Host in Maintenance Mode section of the vSphere Upgrade guide.
  4. Right-click the host and remove it from the inventory.

    Note: If the ESX(i) host is apart of the Virtual Distributed Switch (VDS), you will need to remove it from the VDS before removing from inventory. For more information, see Attempting to remove a host from the inventory when it is connected to vDS generates an error (1018181).

  5. Log in to the host as root.

    For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807).


  6. Make a backup copy of the existing inventory file for the host.

    For ESX 3.0 hosts, run the command:

    cp /etc/vmware/vmInventory.xml /etc/vmware/vmInventory.xml.backup

    For ESX 3.5 and ESX/ESXi 4.x and 5.x hosts, run the command:

    cp /etc/vmware/hostd/vmInventory.xml /etc/vmware/hostd/vmInventory.xml.backup
  7. Clear the contents of the vmInventory.xml file.

    For ESX 3.0 hosts, run the command:

    cat /dev/null > /etc/vmware/vmInventory.xml

    For ESX 3.5 and ESX 4.0 hosts and later, run the command:

    cat /dev/null > /etc/vmware/hostd/vmInventory.xml
  8. From VI Client, add the ESX host back to vCenter Server.
  9. Register the virtual machine manually.

    For more information see, Registering or adding a virtual machine to the inventory (1006160).


Additional Information

Investigating disk space on an ESX or ESXi host
Attempting to remove a host from the inventory when it is connected to vDS generates an error
親なし状態の仮想マシンの再登録手順
重新注册孤立虚拟机