finsfree
Enthusiast
Enthusiast

Cannot delete files in datastore?

We have 5 EXSI host 6.0 and a vCenter server 6.5.

I'm trying to delete a folder that has the vm's files in it off the datastore. I receive an error message stating that the file are not accessible.

I am logged in with the local admin account.

Could it be that there is a locked file somewhere?

0 Kudos
4 Replies
IT_pilot
Expert
Expert

It's not entirely clear why you want to delete a folder. Have you completed storage vMotion, but you still have a folder named VM? Keep in mind that if you renamed a VM, the folder with its files does not change the name before migrating to another storage using storage vMotion and maybe you are trying to delete files of another VM.

http://it-pilot.ru
0 Kudos
finsfree
Enthusiast
Enthusiast

This particular VM is no longer needed. There are some corrupt files associated with this VM and we just want to delete it off the datastore.

Plan and simple we just want remove this VM's files off the datastore.

The error message is "Cannot delete file [datastore name] VM name"

0 Kudos
JinuV
Enthusiast
Enthusiast

Access the any one of the esxi using ssh rm -rf  /vmfs/volumes/volume/filename

0 Kudos
IT_pilot
Expert
Expert

Have you deleted this VM (menu: delete from disk)?

How exactly the files are damaged. For what reason?

You can connect to the host through WinSCP.

If everything is very bad, you may need to migrate other VMs from the datastore and recreate it.

http://it-pilot.ru
0 Kudos