Tuesday, October 8, 2013

Compacting Linux Hyper-V VHDs

To compact linux VHDs, run the command below before you shutdown the virtual machine.
cat /dev/zero > zero.dat ; sync ; sleep 1 ; sync ; rm zero.dat
This creates a large empty file full of zeros and then deletes it.

Original Source

No comments:

Post a Comment