VMware Communities
Sajadasd
Contributor
Contributor
Jump to solution

Storage Not Freeing Up Space After Deleting Files From a VM

Hi
I'm using VMware Workstation Pro 15.

I have a Ubuntu VM and I delete two folders with 60GB size after using them.

But The Storage on my laptop hard disk not freeing up after deleting these folders and still allocates 150GB on my hard disk.

I Delete those folders with "rm -rf " command and the Trash is already empty.

What should I do?

Reply
0 Kudos
1 Solution

Accepted Solutions
Sajadasd
Contributor
Contributor
Jump to solution

Thank you so much.

you are right, i run this command and it takes about an hour on my laptop (with SSD hard disk):

it needs root permission.

vmware-toolbox-cmd disk shrinkonly

for this command, i first install vmware tools package.

and it works and storage start freeing up during running of that commands.

View solution in original post

Reply
0 Kudos
4 Replies
RDPetruska
Leadership
Leadership
Jump to solution

You need to Shrink the virtual disk from the host.  ANY hard disk operation is a *write* operation (even deletes!), so the space is still in use as far as the host is currently concerned.  There should be an option under the VM settings for that virtual hard disk within the Workstation settings.  Note that the VM must be shut down first.

Reply
0 Kudos
Sajadasd
Contributor
Contributor
Jump to solution

There are two options there, compact disk and disk defragment.

Defragment : Defragment files and consolidates free space.

Compact : Compact disk to reclaim unused space.

I run these two options, but the storage not changed at all.

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

AFAIK the "shrink" function is not available via GUI in WS 15.
Please check the documentation.
If necessary there is a manual workaround - let me know if the WS 15 documentation has no instructions for the Shrink operation.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
Sajadasd
Contributor
Contributor
Jump to solution

Thank you so much.

you are right, i run this command and it takes about an hour on my laptop (with SSD hard disk):

it needs root permission.

vmware-toolbox-cmd disk shrinkonly

for this command, i first install vmware tools package.

and it works and storage start freeing up during running of that commands.

Reply
0 Kudos