VMs will be shown as inaccessible in the vCenter




Reason
A VM can become inaccessible due to any of the below reason:

  1. Issue with the ESXi servers
  2. Issue with the vCenter
  3. Issue with the datastore

Resolution
In all the three cases these are the below three troubleshooting steps:
First step will be to restart the management agents in the ESXi.
  • Login to the ESXi using SSH
  • Run any of the below commands to restart the management agents
/etc/init.d/hostd restart
/etc/init.d/vpxa restart

OR

services.sh restart

If this step did not resolve the issue for you, try the second step
Second step will be to remove the VM from the inventory and add using the vmx
file
  1. Right click on the affected VM
  2. Choose the option 'Remove from the Inventory' (Be cautious about this action...Do not delete the VM)
  3. After this step, go to the vmx location of the VM
  4. Right click on the VM and 'Add to the Inventory'
This step will definitely resolve your issue. But this step works fine only when we
know the vmx location of the VM. If you are not sure about the vmx location you
will end up in adding incorrect VMs.
Keep in your mind that you cannot access the vmdk location to find the vmx path
when the VM is inaccessible.
In these kind of situations, the best method is to use command line, the third
step!!!
  • Login to the ESXi hosting the inaccessible VM using SSH
  • Run the below command to know the vmid of the VMs in the host
vim-cmd vmsvc/getallvms




You will receive a message "Skipping invalid VM '144' " along with the details of
valid VMs.
The skipped VM will be the invalid one. The value '144' represents the vmid of the
VM.
  • Now run the below command to reload the invalid VM
vim-cmd vmsvc/reload vmid where vmid is the id of the invalid VM

Comments

Popular posts from this blog

esxi-host-shows-disconnected-vmware

ESXi : Lost uplink redundancy on virtual switch "vSwitch0". Physical NIC vmnic0 is down

Virtual machines appear as invalid or orphaned in vCenter Server