Virtual machines appear as invalid or orphaned or inaccessible in vCenter Server
search cancel

Virtual machines appear as invalid or orphaned or inaccessible in vCenter Server

book

Article ID: 312831

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

This article explains what invalid or orphaned virtual machines are, how they occur, and how you can fix them. The article outlines the most common errors that relate to orphaned virtual machines and how these issues can be resolved.

Symptoms:
  • Virtual Machines show as invalid or orphaned in vCenter Server
  • You may see one or more of these errors when trying to start a virtual machine:
    • "Could not power VM, no swap file, failed to power on VM."
    • "A general system error occurred. The system returned on error. Communication with the virtual machine may have been interrupted"
  • In vCenter logs, you see entries similar to:

    [11916 error 'vpxdvpxdVmomi'] [SoapInitWritelocked] GetVpxaInfo failed for host esxi01.example.com
    [11916 info 'vpxdvpxdVmomi' opID=HB-host-01@3777-1a2b429b] [SoapInitWritelocked] Attempting to get Vpxa version for host esxi01.example.com
    [10060 warning 'Default' opID=HB-host-01@3777-1a2b429b] Closing Response processing in unexpected state: 3
    [11916 info 'vpxdvpxdHostAccess'] [VpxdHostAccess] Failed to get VpxaCnxInfo over SOAP version vpxapi.version.version1 for host esxi01.example.com:Invalid response code: 503 Service Unavailable

    Note: The preceding log excerpts are only examples. Date, time, and environmental variables will vary depending on your environment.


Environment

VMware vCenter Server
VMware vSphere ESXi

Cause

In vCenter Server, an "orphaned" virtual machine is one that exists in the vCenter Server database but is no longer present in ESX host inventory.
An "invalid" virtual machine is a VM that is inaccessible because the ESXi host is offline or inaccessible, the VM configuration file is locked or corrupt or contains a bad option, or other possible causes.

Resolution

In the case of an orphaned virtual machine, the VM needs to be either re-registered if possible (if it has not been deleted) or removed from inventory. To re-register a virtual machine, navigate to the VM’s location in the Datastore Browser and re-add the VM to inventory. For more information, see How to register/add a VM to the Inventory in vCenter Server. To remove an orphaned VM from inventory, right-click the VM and choose “Remove from inventory.”

In the case of invalid virtual machines there are many potential causes and additional troubleshooting is required. The most common causes and resolutions are discussed here.

The ESXi host is not responding or disconnected

Ensure that the ESXi host is accessible and available in the vCenter Server inventory. If the host is “Disconnected” or “Not responding,” all VMs on that host will be unavailable to vCenter. If this is the case, see Troubleshooting an ESXi/ESX host in non responding state for additional diagnostic and troubleshooting information.


The VM configuration file is locked

If the VM configuration file is unexpectedly locked, it may appear as “invalid” in the vCenter inventory.

To verify that this has occurred, navigate to the VM’s directory in the Datastore Browser for the appropriate datastore. You should see the VM configuration file (.vmx file) listed. If the icon for this file is a blank page instead of the VM icon, the typical cause is that the VM configuration is locked. To verify that this is the case, run the vmfsfilelockinfo command from the ESXi host to check the VM configuration file for a lock.
For more information, see Investigating virtual machine file locks on ESXi (10051) .
Note: This article discusses virtual disk (VMDK) files, but it is also applicable to check locks on a VMX file.

After remediating the unexpected file lock, the VM will need to be removed from inventory and re-registered or reloaded.

 

The VM configuration file is missing

If the VM configuration file is missing, the VM will be “invalid” in the vCenter inventory.

To verify that this has occurred, navigate to the VM’s directory in the Datastore Browser for the appropriate datastore. If there is no VM configuration file (usually a file named for the virtual machine) with the “.vmx” extension. If this file is missing but the other files are still available (logs, disks, etc.), then the file may need to be re-created.
For more information about re-creating VM configuration files, see Rebuilding the virtual machine's .vmx file from vmware.log . After re-creating the VM configuration file, the VM will need to be removed from inventory and re-registered or reloaded.

 

The VM Configuration file contains invalid options or text errors

If the VM configuration file is present and unlocked, and the ESXi host is available in vCenter Server’s inventory, the VMX may have become corrupted or contain invalid options or text errors. Most frequently, this will be missing quotation marks, invalid end-of-line, or an option that is not valid.

To determine the exact cause of the invalid option or text error:

  1. Reload the VM configuration. For more information on the reload process, see Reloading a vmx file without removing the virtual machine from inventory
  2. Check the host management agent log file by viewing /var/log/hostd.log
    • # tail -n50 /var/log/hostd.log
  3. You should see messages that indicate the reload failure. For example:
    • info hostd[18267520] [Originator@6876 sub=vm opID=vim-cmd-61-609d user=root] File "/vmfs/volumes/5c182b95-ac4a587e-65f1-###########/testVM/testVM.vmx" line 6: Syntax error.
    • info hostd[18267520] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5c182b95-ac4a587e-65f1-###########/testVM/testVM.vmx opID=vim-cmd-61-609d user=root] Failed to load virtual machine
  4. If there is a “syntax error” listed, there is a fault in the VM configuration file. Examine the file on the appropriate line (in the case of this example, line 6) and ensure that there are no issues with quotation marks, unexpected characters, corrupt entries, invalid options, etc.
  5. After correcting the file, reload the VM again and determine if it returns to normal.
    • If it does not, repeat this process to identify any additional faults

During VMware Tools Installation or Update


When trying to install or update VMware Tools VM could also get into an invalid state.

Additional Information