Pages

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
http://blogs.msdn.com/b/virtual_pc_guy/archive/2005/08/23/454846.aspx

No comments:

Post a Comment