- Open a console session where the
esxclitool is available, either in the ESXi Shell, the vSphere Management Assistant (vMA), or the location where the vSphere Command-Line Interface (vCLI) is installed.
- Get a list of running virtual machines, identified by World ID, UUID, Display Name, and path to the
.vmxconfiguration file, using this command:
esxcli vm process list
- Power off one of the virtual machines from the list using this command:
esxcli vm process kill --type=[soft,hard,force] --world-id=WorldNumber
Three power-off methods are available. Soft is the most graceful, hard performs an immediate shutdown, and force should be used as a last resort.
Alternate power off command syntax is: esxcli vm process kill -t [soft,hard,force] -wWorldNumber
- Repeat Step 2 and validate that the virtual machine is no longer running.
- Right-click the Unknown VM entry and click Remove From Inventory.
- Browse to the appropriate datastore for the virtual machine and open its folder
- Right-click the *.vmx file and click Add to Inventory.
- Power on the virtual machine.
- Repeat Steps 1 to 4 for all unknown virtual machines.