…covering cloud technologies such as Office 365, Azure, Amazon and, of course, SharePoint

Unable to Compact a VHD Due to a File System Limitation

May 05, 2011 by Greg Carnie

While trying to compact a vhd that had been (unbeknownst to me) generating huge quantities of log files I recently ran across the rather strange “Unable to Compact a VHD Due to a File System Limitation” error:

VHD Compact Error
VHD Compact Error

I found a couple things to try thanks to Google:

But none of those worked.  After a fair amount of digging on the net and around my VM I concluded that I had a grand total of 1280MB in VSS copies stored in my VHD itself.  Then I found post by The Angry Technician!  Perfect!!  Diskshadow is the answer.  One simple command to execute, 5 seconds to wait, and everything was good again:


list shadows all (if you want to see them all)

delete shadows all (this was specific to my case, you may want to be selective about which shadows to delete)

Written by Greg Carnie

I am a SharePoint consultant (Business Analyst by title) with Ideaca Knowledge Services based in Toronto, Canada. I have been actively working with SharePoint for three years now and have been specializing more in the developmental and architectural aspects of SharePoint. In a previous life I worked both with SAP and Microsoft Exchange. In my spare time (yes – I have figured out how to have a life outside of SharePoint – only took 3 years!!) I read, have started to get myself back into decent shape, and intend to spend a significant amount of time outside this summer.

You should follow Greg on Twitter