The situation: Windows Server 2012 Hyper-V host, with mixed CentOS 6.4 and Server 2012 guests.
What I'm trying to do: compact the virtual image of a CentOS VM, named XXX, with a vhdx of 43GB.
What I did:
Shut down the VM, booted SystemRescueCD 3.8.1.
Used pvscan to get logical volume information.
vgchange /dev/mapper/vg_XXX-lv-root -a y
Ran zerofill -v /dev/mapper/vg_XXX-lv-root
Ran zerofill -v /dev/mapper/vg_XXX-lv-home
Shut down the VM, then tried to compact it using Hyper-V Manager. No effect whatsoever. The vhdx is still at 43GB.
Any ideas what I did wrong and/or how I can successfully compact that VM?
Below you have the disk space usage, as reported by df -h
. As you can see, the real space usage is at around 11GB.