VMware vSphere

 View Only
Expand all | Collapse all

Unable to delete folder in vSphere datastore

  • 1.  Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 10:41 AM

    In vSphere 6.7, I want to delete a folder in datastore, but the delete button is disabled.

    I guessed that non-emty folders won't be deleted. However, after deleting files inside the folder, still I can not remove the folder.

    Please see the picture below.



  • 2.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 12:43 PM

    Can you connect to ESXi host with root and try to delete it?



  • 3.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 02:38 PM

    @

    I don't see any file manager in esx. Please see the picture below



  • 4.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 02:50 PM

    Tayfun and I were suggesting that you ssh to the host, open the shell and use rm to delete the files directly. If you don't have access to ESXi directly, you'll have to mount the datastore somewhere that has full read/write permissions to that location and delete it that way.



  • 5.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 03:21 PM

    Gidrakos

    Can you explain more?

    I have only used the web interface. From a remote linux machine which is 10.1.1.1, I can not ssh to  vcenter with 10.1.1.2 and esxi with 10.1.1.101

    [mahmood@hpc ~]$ ssh root@10.1.1.101

    ssh: connect to host 10.1.1.101 port 22: Connection refused

    [mahmood@hpc ~]$ ssh root@10.1.1.2

    ssh: connect to host 10.1.1.2 port 22: Connection refused

    [mahmood@hpc ~]$ ping 10.1.1.2

    PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.

    64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.396 ms

    ^C

    --- 10.1.1.2 ping statistics ---

    1 packets transmitted, 1 received, 0% packet loss, time 0ms

    rtt min/avg/max/mdev = 0.396/0.396/0.396/0.000 ms

    [mahmood@hpc ~]$ ping 10.1.1.101

    PING 10.1.1.101 (10.1.1.101) 56(84) bytes of data.

    64 bytes from 10.1.1.101: icmp_seq=1 ttl=64 time=0.262 ms

    ^C

    --- 10.1.1.101 ping statistics ---

    1 packets transmitted, 1 received, 0% packet loss, time 0ms

    rtt min/avg/max/mdev = 0.262/0.262/0.262/0.000 ms



  • 6.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 03:47 PM

    ssh access must be enabled on the ESXi host before you're allowed to connect to it. Here's how to do that: VMware Knowledge Base

    Once you've got access through ssh, you can rm the files/folder but, since it seems you're quite new to this, I have to make sure to remind you that rm is forever, so be 100% certain what you're telling it to remove.



  • 7.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 02:31 PM

    I'm with Tayfun on this one - have you tried going directly to the file itself where it lives on the datastore and deleting it?



  • 8.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 02:47 PM

    Please select "DatastorHDD101" in the tree structure, which should display the folders in the right pane. Selecting the "apps" folder there should allow you to delete it.


    André



  • 9.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 03:17 PM

    a.p.

    If you see the first post, I pasted an image, where I have browsed to datastoreHDD101 and the app folder has been selected. But as you can see the delete button is not enabled.



  • 10.  RE: Unable to delete folder in vSphere datastore
    Best Answer

    Posted Oct 10, 2019 03:34 PM

    That's what I was referring to. What if you select the "DatastoreHDD101" in the mid pane, rather than the apps folder?

    André



  • 11.  RE: Unable to delete folder in vSphere datastore

    Posted Oct 10, 2019 04:28 PM

    O Yes you are right.

    I got it. See the picture. Thank you.



  • 12.  RE: Unable to delete folder in vSphere datastore

    Posted Aug 31, 2021 09:15 AM
      |   view attached

    Hi,

    simply click on the datastore name, not the folder. Then you'll be able to delete what you want.

     

     



  • 13.  RE: Unable to delete folder in vSphere datastore

    Posted Feb 22, 2023 05:45 PM

    I am going to post on this as well since the solution didn't seem that clear to me.

    You can only use the "DELETE" option for folders when the folder is selected from the farthest right tier.  You have to select the "DATASTORE" in the middle tier and then highlight the folder in the 3rd tier (all the way on the right side).  Once you select the folder all the way in the right column, you will be given the DELETE option at the top.

    -Sam