VMware ESXI 6.5
I just migrated all my VM's from internal data stores to NAS NFS datastores all went well.
Now I went thru all the local data stores and I found folders of some of the VMS's I moved still lingering.
I had six of 60 VM's
I was able to verify non of the files are required and deleted the files and folder and they are all clear except for one file I can not delete
This VM is up and running and the new location has a vmdk and this server only has one disk drive assigned.
File locked maybe?
Any ideas?
Thank you
Tom
I don't see any arguments when you call rm -rf, so the command doesn't know what to delete.
Invoke it with a parameters, eg. something like:
rm -rf *
the above will delete everything in the current folder.
Hi,
Did you try to access via SSH from an ESXi host and delete the file from it?
You should be able to see who is locking that file and hence, you can't delete it.
No do not use ssh option that often.
What is the command line I need to use ?
Also
How do I find this using powercli?
He means manually deleted as my perspective ( rm -rf ). If VMs vmdk is on another datastore, it will be Ok.
Enter ssh. Then /vmfs/volumes then you need to enter your datastore where it was exist.
Cheers.
How about using powercl?
Guys
I enabled SSH on the Host.
SSH'd into the host using ROOT account and password.
[root@TGCSESXI-4:~] /vmfs/volumes
-sh: /vmfs/volumes: Permission denied
I had to use cd\vmfs now I can see the datastores the rm -rf did not remove the file either see below.
[root@TGCSESXI-4:/vmfs/volumes] cd Datastore-SSD-480
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5] ls
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5] cd TGCS003-2
012R2
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5/TGCS003-2012R 2] ls
TGCS003-2012R2-000001.vmdk~ TGCS003-2012R2-000001.vmdk~
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5/TGCS003-2012R 2] rm -rf
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5/TGCS003-2012R 2] ls
TGCS003-2012R2-000001.vmdk~ TGCS003-2012R2-000001.vmdk~
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5/TGCS003-2012R 2] ls -ltr
total 0
-rw------- 1 root root 420 Jan 11 02:02 TGCS003-2012R2-000001.v mdk~
-rw------- 1 root root 420 Jan 11 02:02 TGCS003-2012R2-000001.v mdk~
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5/TGCS003-2012R2] rm -rf
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5/TGCS003-2012R2] ls
TGCS003-2012R2-000001.vmdk~ TGCS003-2012R2-000001.vmdk~
[root@TGCSESXI-4:/vmfs/volumes/5a80e634-c674e092-3fbc-d4ae52776cb5/TGCS003-2012R2]
Any ideas on why I ca not delete this file
Thank you
I don't see any arguments when you call rm -rf, so the command doesn't know what to delete.
Invoke it with a parameters, eg. something like:
rm -rf *
the above will delete everything in the current folder.
Thanks adding the * deleted the files
Stange how you could not delete the same file using the GUI