This article explains what invalid or orphaned virtual machines are, how they occur, and how to fix them. The article outlines the most common errors that relate to orphaned virtual machines and how these issues can be resolved.
vpxd.log
file located in /var/log/vmware/vpxd/
on the vCenter server, the following is seen:[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
VMware vCenter Server
VMware vSphere ESXi
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.
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 ESX host shows as not responding in vCenter Server when performing any activity for additional diagnostic and troubleshooting information.
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. VM configuration file (.vmx file) will be 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.
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.
For more information registering VMs from the Datastore Browser, see How to register/add a VM to the Inventory in vCenter Server
For more information about reloading the VM configuration from the ESXi command line, see Reloading a vmx file without removing the virtual machine from inventory
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:
# tail -n50 /var/log/hostd.log
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
When trying to install or update VMware Tools VM could also get into an invalid state.