VM Server grayed out states explanation : disconnected, inaccessible, orphaned & invalid
disconnected
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.
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)
inaccessible
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.
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.
orphaned
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.
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.
invalid
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.
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.
below approach can be useful :-
1) Locate the Datastore where
vmx file is residing.
a) Login
to one of the esxi hosts of the cluster where vm is hosted.
b) Search
for the .vmx file. [Replace vmname with actual virtual machine
name that is inaccessible]
# find
/vmfs/volumes/ -name vmname.vmx
/vmfs/volumes/506aa411-f26fafc6-279c-ac162db79849/vmname/vmname.vmx
c) Now
search for the datastore name using above ID. Note the datastore name.
# ls
-l /vmfs/volumes |grep 506aa411-f26fafc6-279c-ac162db79849
drwxr-xr-t
1 root
root
2520 Nov 22 22:38 506aa411-f26fafc6-279c-ac162db79849
lrwxr-xr-x
1 root
root
35 Nov 24 06:57 VMAX-C-GSS-1 -> 506aa411-f26fafc6-279c-ac162db79849
2) Locate the Host
Login to Each host of the cluster
where vm is residing.
a)
Run following command on each host to get "World ID" against vmname.
# esxcli vm
process list |grep -A 1 vmname
vmname
World ID: 25567
Case 1
if
"World ID" is visible on any host, then kill it using below command
and follow Sequence (3)
#
esxcli vm process kill --type=soft --world-id=25567
Case 2
if
"World ID" is not visible then continue with Sequence (3)
3) Remove server from
Inventory (if not able to remove from inventory then perform
services.sh.restart on esx )
a)
Login through vsphere client and search the invalid VM.
b) Right
click on the VM and "Remove from Inventory" NOTE:
"Do not remove from Disk"
4) Add Host to Inventory
a) Browse
Datastore using vsphere client where the vmx file is located. if the
vmx file is still grayed out, then contact Virtualization Team.
b) Right
click on the vmx file and "Add to Inventory"
c) Once
the VM is visible in vsphere client, right click to "Power on the VM
"
if above didn’t work then another option is to rename .vmx
file and then try to add to inventory and power on server , it happens because
cloned vm server sometime left there name in inventory and while re adding it
will give already exists error.
Comments
Post a Comment