Page 1 of 1

Defrag a VM?

Posted: 30. Mar 2021, 15:50
by jmar83_the2nd
Host: Windows 10 Pro
Drive: RAID 10 (HDD, not SSD)
Guest Windows Server 2012 (as a file server)

Question: Does it make sense to defrag the Windows Server 2012 VM INSIDE the VM - via the Windows Server 2012 system? (So not from "outside" -> to defrag the whole drive in the Win10 host system)

Does that cause a speed advantage? Or is it more the opposite, does it make it slower?

My prefered defrag tool to "Auslogics Defrag": https://www.auslogics.com/en/software/disk-defrag/


Can i use that or not? Thank you very much for your feedbacks.

Re: Defrag a VM?

Posted: 30. Mar 2021, 16:04
by mpack
Whether it is made faster - that depends on too many factors, like how fragmented the guest actually was, how fragmented the host is, and the type of host drive (e.g. fragmentation is a non-issue on SSDs). It also makes a difference what filesystem we're talking about: e.g. NTFS has no particular tendency to become fragmented unless heavily congested and a lot of file rewriting is happening.

One thing you will notice: defragging will make a dynamic VDI jump to a much larger size on the host, assuming it wasn't already near its maximum. Compaction will be necessary to restore sanity.

I have never bothered to defragment a VM drive. I don't remember the last time I did it on the host either - IMO it just isn't a big deal with NTFS. Certainly not the big deal that Linux-heads like to make out.

This is a bit like the third party AV issue: people keep trying to apply Win95 solutions to Win10 non-problems.

Re: Defrag a VM?

Posted: 30. Mar 2021, 18:12
by jmar83_the2nd
OK, thank you very much. Then better not... ;-)