Ashadsaleem
Contributor
Contributor

Workstation pro 15 reclaim unused space

Hi Everyone,

Host PC - Windows 10

My vm - RHEL7

My host pc is running out of space so decided to delete unwanted stuffs in the vm. though i deleted significant amount of files. host space remains same. to reclaim the space i have to fill with 0s in vm drive.

I found out running this command will do the work.

cat /dev/zero > /zero.fill;sync;sleep 1;sync;rm -f /zero.fill

My question is, will this command affect my vm's snapshots? any other consequences ?

Thank You

0 Kudos
6 Replies
fugrat1
Enthusiast
Enthusiast

If you have a snapshot then I don't believe you will be able to reclaim this space.  Any deletions you make within the guest OS will simply be written into the snapshot file and not free up the space.  Are you able to commit the snapshot?

0 Kudos
bonnie201110141
VMware Employee
VMware Employee

You can right click the vm in library > Manage > Clean Up Disk to reclaim space. And alternatively, you can also click vm settings > Hard disk > Defragment  & Compat to reclaim space.

Let me know if it works for you.

0 Kudos
Ashadsaleem
Contributor
Contributor

I did that already. but it's not freeing up the space.

0 Kudos
bonnie201110141
VMware Employee
VMware Employee

Do you have snapshot with your VM?

0 Kudos
Ashadsaleem
Contributor
Contributor

yah i have 4 snapshots and i need all 4 of them

0 Kudos
Ashadsaleem
Contributor
Contributor

that's what i was thinking but i wasnt sure enough..

0 Kudos