VMware Cloud Community
mahmn
Enthusiast
Enthusiast
Jump to solution

Unable to delete folder in vSphere datastore

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.

Untitled.png

1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

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

André

View solution in original post

12 Replies
tayfundeger
Hot Shot
Hot Shot
Jump to solution

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

--
Blog: https://www.tayfundeger.com
Twitter: https://www.twitter.com/tayfundeger

vBlogger, vExpert, Cisco Champions

Please, if this solution helped your problem, "Helpful" if it solves your problem "Correct Answer" to mark.
Reply
0 Kudos
Gidrakos
Hot Shot
Hot Shot
Jump to solution

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?

Reply
0 Kudos
mahmn
Enthusiast
Enthusiast
Jump to solution

@

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

Untitled.png

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

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é

Reply
0 Kudos
Gidrakos
Hot Shot
Hot Shot
Jump to solution

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.

Reply
0 Kudos
mahmn
Enthusiast
Enthusiast
Jump to solution

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.

Reply
0 Kudos
mahmn
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

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

André

Gidrakos
Hot Shot
Hot Shot
Jump to solution

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.

mahmn
Enthusiast
Enthusiast
Jump to solution

O Yes you are right.

I got it. See the picture. Thank you.

Untitle2d.png

SURDQ
Contributor
Contributor
Jump to solution

Hi,

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

 

 

Reply
0 Kudos
SamelCamel
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos