You are on page 1of 1

Steps to Shrink VMware Disks

 Step 1 – Clean Up Guest OS (Launch the VM)


 Windows: Execute the following command(s) as Administrator – Consolidate & Clean free space
defrag /C /X
/C Defragment all local volumes on the computer.
/X Perform free space consolidation. Free-space consolidation is useful if you need to shrink a volume, and it
can reduce fragmentation of future files.
sdelete -c -z c:\  [drive letter]
-c Clean free space.
-z Zero free space (good for virtual disk optimization).
 Linux: Execute the following command(s) as Root - "ZeroOut" unused Space
cat /dev/zero > zero.dat ; sync ; sleep 1 ; sync ; rm -f zero.dat
Or
dd if=/dev/zero of=zero.dat ; rm -f zero.dat
 Creating a file and filling it with zeros until the virtual machine runs out of space
 Synchronizing the file system and deleting the file that is made of zeros

 Step 2 – Run Disk Cleanup (Shut down the VM)


 VMware Workstation  VM  Manage  Clean Up Disks…

 Step 3 – Defragment the Virtual Disk (Shut down the VM)


1. VMware Workstation  VM  Settings  Hard Disk  Defragment (Defragment files and consolidate free
space.)
2. VMware Workstation  VM  Settings  Hard Disk  Compact (Compact disk to reclaim unused spaces.)

 Step 4 – Manage Snapshots (Shut down the VM) (Ensure you have no snapshots)
 VMware Workstation  VM  Snapshot  Snapshot Manager   Show AutoProtect snapshots 
Delete all snapshots

 Step 5 – Power Off Instead of Suspending

You might also like