Removed VM from VC inventory or unregistered VM from ESXi host before confirming the VM folder and file location and names.
VM folder and file names do not match current VM display name (label) in vSphere client inventory.
Use the below steps to find the VM "displayName" (label) value within the VM's vmx file matching the last known display name seen in vSphere inventory.
Accessing and Identifying VM Files on ESXi Host via SSH
cd
command to navigate to the datastore directory where the VM is believed to be stored: cd /vmfs/volumes/<datastore_name>
<datastore_name>
with the actual name of the datastore..vmx
files within the datastore directory: find . -iname "*.vmx"
Method 1: visual inspection
cat
and less
commands to review the contents of each .vmx
file: cat <vmx_filename> | less
displayName
parameter and its corresponding value to identify the desired VM.Method 2: grep search
grep
command to filter .vmx
files based on the VM's display name: find . -iname "*.vmx" | xargs grep -i "<VM_DISPLAY_NAME>"
<VM_DISPLAY_NAME>
with the exact display name of the VM you're searching for.
Once the VM is registered again within VC inventory, perform a Storage vMotion to a different data store or clone the VM to force the VM folder and file names to be updated to match the current VM display name. You can storage vMotion the VM back to the original data store once complete if necessary.