Team Fusion wrote a great post on “defragging” vm’s and why you shouldn’t do it. Or at least be very careful about it. Make sure to read it!
Before we begin, it’s important to note that defragmentation isn’t a necessary task – your virtual machine will still work just fine even if you never defrag, and the effects of fragmentation are usually not noticeable. Personally, I’ve never feel the need to defrag. However, if for some reason you do feel the need to defrag, here’s how to do it. Note that snapshots get in the way of proper defragmenting.
Forbes says
This article relates to sparse disks in Fusion. The main reason they argue not to defrag them, is that it would grow the disk. Obviously this doesn’t apply to most ESX cases. I wonder if the same advice would apply to monolithic disks as well? Anyone know?
Duncan says
Well I do think it applies for ESX, especially when you’ve got Snapshots. And what about the upcoming new version with stuff like linked clones!
Kent says
We still believe that we should defrag all our monolithic clients. The problem the Fusion team relates to is reorganizing and expanding a COW disk. Obviously this is not a good situation as it just increases the disk size to the maximum amount and then starts over. A monolithic file will not have the same problem of expanding disk size. That may change in the future as you implement those linked clones, but I have to believe that there will be penalties for that scenario.
Otherwise, we’d all run our disks as sparse today.