VMware Communities
leventeliu
Contributor
Contributor
Jump to solution

Solution to decrease virtual disk space usage in host OS?

After long-term usage, one of my virtual disks seems to be irreversibly taking much more space in its host OS than actual usage in the guest OS. Since my laptop has only 1TB disk and no way to add other disks for now, I have to find a way to solve this before it consumes all disk space up.

Here is some information:

ProductVMware® Workstation 16 Pro 16.2.5 build-20904516
Host OSWindows 11 Pro
Guest OSLinux 5.15.114-2-MANJARO
Disk type0 (single growable virtual disk)
Snapshots/disk chainnone
Disk usage in Guest92G
Disk format in Guest1 primary partition of etx4, 500GB capacity
Disk file usage in Host244G

 

What I have tried: defragmenting and shrinking, multiple times, it seems 244G is the best I can get.

Maybe another solution: create a new disk, partition, format, mount, and copy data from the old disk. I tried this on another smaller and irrelevant disk and it works fine - the newly created disk file takes 9G while its disk usage is 8.9G in the Guest OS, but it's the last thing I want to do with my home data disk.

Any better idea?

Labels (3)
Tags (3)
Reply
0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

>>> defragmenting and shrinking, multiple times, it seems 244G is the best I can get.

Did you zero out the guest file system (unused disk sapce)  before trying to shrink the virtual disk?

André

View solution in original post

Reply
0 Kudos
5 Replies
a_p_
Leadership
Leadership
Jump to solution

>>> defragmenting and shrinking, multiple times, it seems 244G is the best I can get.

Did you zero out the guest file system (unused disk sapce)  before trying to shrink the virtual disk?

André

Reply
0 Kudos
leventeliu
Contributor
Contributor
Jump to solution

Oh, this sounds like the missing piece of my puzzle, I should try it later, thanks!

Reply
0 Kudos
hadjer1
Enthusiast
Enthusiast
Jump to solution

Hello,

If you disk is thin provisioned try to reclaim space. https://docs.vmware.com/en/VMware-Workstation-Pro/17/com.vmware.ws.using.doc/GUID-421A1073-BF16-4BC7...

If you disk is thick provisioned ("reserve the whole space" when created), then use VMware converter to transfrom the VM disk into thin provisioned, here is an example of a VM in my laptop (I show only the step where you change the disk to thin provisioned) :

hadjer1_0-1688138037785.png

If you need more explanation ping me.

Reply
0 Kudos
leventeliu
Contributor
Contributor
Jump to solution

From the article you provided:


...

Prerequisites

  • Verify that you are using a Windows host and that the guest operating system uses NTFS. (NTFS is standard in Windows XP or later operating systems.) This feature works on all NTFS hard disks but reclaims more disk space if the operating system is Windows XP or later.

My guest OS is not using NTFS so this doesn't seem to be the right solution.

Reply
0 Kudos
leventeliu
Contributor
Contributor
Jump to solution

This is the right answer, the key point is that wmware's tool does not deal with different guest filesystems, I was always wrong about this😆

Reply
0 Kudos