Jump to content

Any Point To Defragging a VHD File?


nikki605

Recommended Posts

I have Windows XP Mode VM installed on my Win7 x64 laptop. The hard drive image file - Windows XP Mode.vhd - is a little over 32GB. Is there any real advantage to defragging this file? It almost always gets fragmented (right now it is at 3 fragments) but it obviously takes a very long time to defrag a file this big.

 

I'm just wondering what you folks who have a VM installed do about defragging the vhd file. I'm really considering excluding it.

 

Thanks for any input or opinions! :)

Edited by nikki605

Win10 Pro x64 Desktop (Speccy) - Win10 Pro x64 Laptop (Speccy)

Link to comment
Share on other sites

  • Moderators

probably better to defrag from within the vm (at least that's what I've always done)

 

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION

DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.

Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)

ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.

Support at https://support.ccleaner.com/s/?language=en_US

Pro users file a PRIORITY SUPPORT via email support@ccleaner.com

Link to comment
Share on other sites

To correctly defrag a VHD, you need to do it outside and inside. This means running a defragger on the host machine. Then a defragger inside the virtual machine.

 

The good news is once defragged, the host file tends to remain contiguous. The bad news is any sort of gains here are going to be minimal.

Link to comment
Share on other sites

One thing my lady does with her .vhd files is she puts them into their own separate partition. Keeping this simple, let me try to explain.. imagine a standard windows machine, o/s and apps and some user data - it's all in DRIVE C partition. Kosher!

 

Then she's got a DRIVE H partition and DRIVE L partition, each holding its own .vhd file.

The DRIVE H partition she says is 49GB, and the .vhd on it is 48GB. Ditto for DRIVE L.

This way the files are not disturbed or fragmented. Of course what happens within each .vhd is another animal entirely.

 

So we have 1 HDD holding 3 partitions there.

Link to comment
Share on other sites

  • Moderators

keetah, I do the same thing, I've so many extra laptop drives I put whole virtual machines each.

 

also, you've been here long enough to know, if somebody hasn't answered a thread after you post you need to edit your post and not double tap a thread. KThx

 

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION

DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.

Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)

ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.

Support at https://support.ccleaner.com/s/?language=en_US

Pro users file a PRIORITY SUPPORT via email support@ccleaner.com

Link to comment
Share on other sites

  • Moderators

when i first started using .vhd's and XP Mode under Win7, i thought killing the .vhd and starting a new one would be a quick way to defrag it.

you know, like the pagefile.

 

yeah... don't do that, whole world of hurt.

 

just a warning to other young .vhd pups out there....

Backup now & backup often.
It's your digital life - protect it with a backup.
Three things are certain; Birth, Death and loss of data. You control the last.

Link to comment
Share on other sites

when i first started using .vhd's and XP Mode under Win7, i thought killing the .vhd and starting a new one would be a quick way to defrag it.

you know, like the pagefile.

 

yeah... don't do that, whole world of hurt.

 

just a warning to other young .vhd pups out there....

No, I never considered deleting it. I decided to exclude it in Defraggler. I only have a couple of uses for the VM, so I don't use it that often.

 

Thanks for the suggestions & opinions. :)

Win10 Pro x64 Desktop (Speccy) - Win10 Pro x64 Laptop (Speccy)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.