Compacting dynamic VHD
Posted on 2015-01-06
Ok, this one has me stumped. Host is Hyper-V 2012 R2 server. Guest server is Server 2008 R2 with Dynamic VHD. I was able to install software that would defragment the drive and optimize it by moving all the files that were near the end of the drive to be closer to the beginning. Looked great. Then I thought I should go ahead and try and shrink the drive (within the guest OS). It shrunk down to about 200 gigs (which is where I wanted it to be.. vs. 300 gigs). So I am sitting here all happy and decided to try and compact the drive. The actual contents of the drive were only taking up about 90 gigs so I estimated that the compact should knock it down to about 100 or so gigs. The VHD file was sitting at 234 gigs. I started the compacting (with the guest shut down of course) and after about an hour it finished with no errors... but also no shrinkage at ALL. The vhd was still sitting at 234 gigs. I went thru the error logs and could not find ANY errors.