Short post on different connectivity states of a virtual machine and how to fix them.
A virtual machine is marked as disconnected when the vCenter has lost communication to the ESXi host where the virtual machine is running. The host is marked as not responding. This state is usually caused by a host that has been crashed. Other reasons could be network issues or problems with the vpxa service running on the host.
In this state vSphere HA would usually comes into play and tries to restart the virtual machine on another host in the cluster.
You can quickly reproduce that state by stopping vpxa (~ # /etc/init.d/vpxa stop)
A virtual machine is marked as inaccessible when the host can no longer access the virtual machine configuration (.vmx) file. That state can be caused by problems with the storage array or a renamed folder in the datastore.
When there is no issue with the storage array, remove and re-add the virtual machine to the inventory to solve this problem.
The virtual machine is no longer registered on the host it is associated with. That state can be caused by deleting a virtual machine directly on a host.
To fix this issue remove the orphaned entry form the vCenter Server. How to remove orphaned linked clones in a horizon view environment is explained here.
A virtual machine is marked as invalid when the virtual machine configuration format is invalid. It is accessible on disk, but corrupted in a way that does not allow the server to read the content.
Examine the virtual machine configuration and re-add the virtual machine to the inventory. Check vmware.log in the virtual machine directory for error messages.
The virtual machine is no longer registered on the host it is associated with. That state can be caused by deleting a virtual machine directly on a host."
Mate, this is not exactly true, or at last not all, most of orphaned VM state is caused by APD and PDL and sometimes PDL autoremove feature, so when ESXi host lost access to some datastore/LUN on which VM running but after datastore/LUN appear again host not recognize this datastore as old but as new one, then vCenter mark such VM as orphaned because from their perspective there is no acces to registered VM, even if it is running.
Virtual machines appear as invalid or orphaned in vCenter Server (1003742)