ESXi Host – VM showing invalid status

I came across issues a few days back where I had a few machines suddenly showing an “invalid or unknown” state. Here are a few things you can try.

First Putty in to ESXI host which has the datastore attached. It could be any ESXI host as long it see the sees the same storage on the VM with the issue is hosted.

See if the VMs are locked and here are a few useful commands :

vmware -vl  ! to show the build and version of the ESXI host OSI

Select the DataStorage and then see the Volumes

[root@PROD-123:/vmfs/volumes] cd vmfs/volumes/vsanDatastore

[root@PROD-123:/vmfs/volumes] ls ! this will list all volumes and select the volume you want to work on and where the machine is hosted.

!! Display should look like this…

36917b7b-6d810676-4ae9-b37fa58300ae 5dcf5367-36e16378-0f7b-b8599fb141c4 vsan:52ae7ab2252f6718-c45c79871b23a521
5dcf5367-1eb8641a-7206-b8599fb141c4 5f815270-915adf5c-66f2-6df110ae3816 vsanDatastore

/vmfs/volumes] cd vsanDatastore ! this will select the VSAN or DataStorage

[root@PROD-123:/vmfs/volumes] cd vsanDatastore
[root@PROD-123:/vmfs/volumes/vsan:52ae7ab2252f6718-c45c79871b23a521] ls  !! note, we see the VSAN ID listed

ls ! to list the all VMs hosted on the storage

!! to see the all machines with the name starting with Thermo – I am using Thermo as a test machine

73c8de5d-fdbd-c254-8636-246e968ef350 ThermoAProd  ! 

[root@PROD-123:/vmfs/volumes/vsan:52ae7ab2252f6718-c45c79871b23a521] cd Thermo

[root@PROD-123:/vmfs/volumes/vsan:52ae7ab2252f6718-c45c79871b23a521] cd ThermoAProd/  ! once the machine is selected

List all files for the VM

[root@PROD-123:/vmfs/volumes/vsan:52ae7ab2252f6718-c45c79871b23a521/9b5f4e5c-c2ce-57c0-bf28-000af7bf7c14] ls

ThermoAProd-3c98b330.hlog ThermoAProd.vmx ThermoAProd_1.vmdk vmmcores.gz vmware-5.log
ThermoAProd-ctk.vmdk ThermoAProd.vmx.lck ThermoAProd_2-ctk.vmdk vmware-1.log vmware-6.log
ThermoAProd.nvram ThermoAProd.vmxf ThermoAProd_2.vmdk vmware-2.log vmware.log
ThermoAProd.vmdk ThermoAProd.vmx~ ThermoAProd_3-ctk.vmdk vmware-3.log vmx-ThermoAProd-255294354-1.vswp
ThermoAProd.vmsd ThermoAProd_1-ctk.vmdk ThermoAProd_3.vmdk vmware-4.log vmx-zdump.000

[root@PROD-123:/vmfs/volumes/vsan:52ae7ab2252f6718-c45c79871b23a521/9b5f4e5c-c2ce-57c0-bf28-000af7bf7c14] clear
[root@PROD-123:/vmfs/volumes/vsan:52ae7ab2252f6718-c45c79871b23a521/9b5f4e5c-c2ce-57c0-bf28-000af7bf7c14] cd
[root@PROD-123:~] vim-cmd vmsvc/getallvms  ! This will list all VMs