Reduce KVM Windows qcow2 file size

  1. Clean up the virtual drive (remove temps files, etc)
  2. Defrag with the open source UltraDefrag software with “full optimisation”
  3. Run “sdelete -z c:
  4. Run “qemu-img convert -p -f qcow2 -O qcow2 Win7.qcow2  /newpath/Win7.qcow2

For Linux Guest:

dd if=/dev/zero of=/mytempfile
# that could take a some time
rm -f /mytempfile

https://technet.microsoft.com/en-us/sysinternals/sdelete.aspx

qemu-img resize my-server.qcow2 +10GB to increase the size of a qcow2 file

This entry was posted in Linux, Windows and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *