Helps identify the ESXi host and datastore where a virtual machine was registered after it was removed from inventory
VMware ESXi
VMware vCenter Server
Follow the steps below to identify the ESXi host and datastore where the virtual machine that was removed from the inventory was registered.
Identifying the ESXi host :
1. Log in to vCenter via SSH
2. shell
3. Enter the following command:
ć»journalctl | grep "vim.event.VmRemovedEvent" | grep "virtual machine name"
Identify the ESXi host from the command output below
Nov 16 07:47:01 <vCenter FQDN> vpxd[19009]: Event [153325] [1-1] [2025-11-16T07:47:01.801868Z] [vim.event.VmRemovedEvent] [info] [VSPHERE.LOCAL\Administrator] [Datacenter] [153324] [Removed <VM Name> on <ESXi host FQDN> from Datacenter]
Identifying the Datastore :
1. Connect to the identified ESXi host via SSH.
2. Check the virtual machine's mount point.
find /vmfs/volumes/ -type f -name "*.vmx" -exec grep -Hi "displayName.*<VM Name>" {} \;
3. Identify the datastore name associated with the mount point.
esxcli storage filesystem list