How to fix VMWare ESXi Virtual Machine ‘Invalid Status’
Troubleshooting VMWare ESXi Virtual Machine ‘Invalid Status’
Let’s troubleshoot VM Invalid status
You can see multiple “invalid” VM machines in the image below. Here status is showing invalid.
Reason of Invalid VM Machine status could be related to the storage of underlying machine has been moved or changed, or corrupted, deleted and it moved to another storage device and as a result of which VMware ESXi hosts no longer knows what it is and consider VM Machines as invalid.
You need to delete the invalid VM Machines and add it manually if the machine does exist.
Please consider below points before deleting any VMware Machine
- Check .vmx file for configuration of the host. It should be accessible to replicate the new VM after deleting invalid host.
- Check if .vmx file is in unlock state
- Check VM tools for installation like SSH/putty
There -> Navigator -> Virtual Machines -> Select VM
Click on Action -> Right Click the Action Tab -> It will give you so many options to allow, delete, and unregister you the VMware Machine.
You can select unregister Tab to remove the device from here. However if you find the options in greyed-out colour then you need to unregister the devices from SSH access.
First you need to enable SSH for VMware ESXi machines and then connect to the machines by using a putty session.
Go to Manage -> Services -> TSM-SSH -> SSH -> Action -> Select Start
And apply a running option to enable the SSH application for the host.
Login to Putty session from Windows Machine.
Make sure you can login as a root user.
Once you login into putty session type below command to provide the overview what is running in the ESXi host
# vim-cmd /vmsvc/getallvms
You can see that the output of the command can show you the list of VM IDs. You can pick the list of VM IDs which you want to remove from the VM host.
Now further you can check the list of VM IDs with invalid status along with ID number.
Case 1: Reload VM to recover from invalid state
Here first, we will try to recover the host by reloading the configuration. We can try to reload the VM as to rectify the issue but if it fails then we have to unregister the VM (case-2)
# vmsvc/reload <VM id>
Case 2: Unregister VM Host
Now we need to unregister the above invalid VM IDs from CLI by running below command followed by VM ID number
#vim –cm /vmsvc/unregister <VM id>
Further you can cross verify the removal of VM IDs from the Web GUI of host as well.
You can reconfigure the VM hosts once removing the VM IDs.
Thanks for reading!!!
Continue Reading:
Hyper V vs VMware : Detailed Comparison