SSH to the ESXi host as root and navigate to /vmfs/volumes/<data store guid or name>. Locate the VM folder although from your pic, it seems that the vmx files are under the root of the datastore itself.
Do an ls -l to verify that the files do indeed exist and to check what permissions are currently assigned. If they do exist, change the permissions using something like chmod 755 vmxfile and then try removing then using rm vmxfile.
Something like so:
This look that its already been locked by someother host. If that not the case. All you can browse the datastore and delete it.
other possibility to remove all kind of lock is to reboot the host.
see if that help, or let me know if you get any errors ?
Have you checked browsing datastore those files exists there ? If not, restart management agent and recheck.
check which host is locking the file if the delete from datastore browser fails.
once VM is powered off the delete from datastore for the vmx should succeed .
you can use the command
vmkfstools -D vmname.vmx
to determine the mac address of the hold which is locking the file.
ssh to the hold and if there is any vmx process locking the file , kill the vm-world holding the lock
you should then be able to delete the file.
tried but it dosent work with your mention
Thank you so much vijayrana968
How did you removed these VMs before it starts showing this status. Did any error shown when you tried to delete ?
SSH to the ESXi host as root and navigate to /vmfs/volumes/<data store guid or name>. Locate the VM folder although from your pic, it seems that the vmx files are under the root of the datastore itself.
Do an ls -l to verify that the files do indeed exist and to check what permissions are currently assigned. If they do exist, change the permissions using something like chmod 755 vmxfile and then try removing then using rm vmxfile.
Something like so: