0% found this document useful (0 votes)
112 views1 page

Steps To Shrink VMware Disks

Clean up free space on the guest OS, run disk cleanup, defragment the virtual disk, delete any snapshots, and power off instead of suspending to shrink VMware disks. Execute commands like "defrag" and "sdelete -c -z" on Windows and "dd" and "cat" on Linux to zero out unused space. Then use VMware Workstation options to clean up disks, defragment, compact the disk, and remove snapshots before powering off the VM.

Uploaded by

FrancesHsieh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views1 page

Steps To Shrink VMware Disks

Clean up free space on the guest OS, run disk cleanup, defragment the virtual disk, delete any snapshots, and power off instead of suspending to shrink VMware disks. Execute commands like "defrag" and "sdelete -c -z" on Windows and "dd" and "cat" on Linux to zero out unused space. Then use VMware Workstation options to clean up disks, defragment, compact the disk, and remove snapshots before powering off the VM.

Uploaded by

FrancesHsieh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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