Defrag a VM?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Defrag a VM?

Post 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.
regards, jan
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Defrag a VM?

Post 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.
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Re: Defrag a VM?

Post by jmar83_the2nd »

OK, thank you very much. Then better not... ;-)
regards, jan
Post Reply