Shrink/Compact and Re-size VMWare Image in VMWare Player

I had an office PC converted into a VMWare image and wanted to reduce the image file after cleaning up unwanted files and applications. The compact command for the HDD will not totally reduce the image file size in the HOST OS.

VM Image OS is Windows XP. For linux, I will assume a different process.

To literally reduce file size in the host OS, what I did…

  1. Free up disk space.
  2. Zero fill freed up space, I used CCleaner
  3. Shutdown the VM
  4. Run again VMWare Player and right click on the VM
  5. Go to Hard Disk and under Utilities -> Compact
  6. Finish the compact phase and start the VM again.
  7. Install any Partitioning software, I used EaseUS.
  8. After completing the installation, re-size the Hard Disk that has the freed up space to a smaller space that you want
  9. Apply the re-reize
  10. Shutdown the VM, the actual size on the Host OS will now have the reduced file size.

You can expand the size again of the partition/hard disk using the partitioning software and it will not affect the actual VM image file size in the host OS until you start adding new files/data into it.