I recently discovered a situation where a virtual machine was still showing on a datastore that was literally empty. There where no files leftover and also nothing like ISO or configuration stuff pointed to the old datastore.
The problem was, the VM had a floppy device configured that was not visible through the vSphere UI
It showed up when using PowerCLI
get-vm VM_Name| Get-FloppyDrive
FloppyImagePath HostDevice RemoteDevice
————— ———- ————
Removing it was done also via PowerCLI.
get-vm VM_Name|| Get-FloppyDrive | Remove-FloppyDrive
And magically VM is no longer registerd to that Datastore and i can go on decommissioning it.