Friday, March 17, 2006

How to defrag a Virtual Server

I have had several responses about "How do I defrag a virtual server image?" or the one that I loved.. "Do you mean defrag of the system volume?" As a general rule, you should always defrag your system volume frequently. I find that monthly for my work system and weekly for my game system is good for what I need. By the nature of Windows, when it boots, the system becomes fragmented. Save frequently, Save Often and Defrag often.

A lot of the performance issues we can experience with Virtual PC are the result of drive fragmentation. These steps will defrag your Virtual PC hard drive, compress it to a smaller file size, and optimize its location on the host drive.

How to Defrag:

1. Defrag your Virtual drive.

a. Launch the Virtual Machine, log in as an administrator

b. Remove any Installation temporary folders or un-needed folders

c. Empty the Recycle Bin

d. Go to Start/Programs/Accessories/System Tools and run Disk Defrag

e. This can take 10 minutes to 30 minutes to run

f. Do this at least 3 teams, until it defrags quickly

2. "Zero out" your Virtual Drive ( Download the updated add-ons)

3. Compact your Virtual Drive

a. Shut down any running Virtual PCs

b. Under the Virtual PC console, select “File” then “Virtual Disk Wizard”

c. Select “Examine or Modify existing disk image”

d. Select the disk image file you wish to compact

e. Select “Compact the disk image”

f. Select “Use original file” (or a separate file if you require)

g. Finishing the Wizard will compact the file. This may take a long time

4. Defrag your host drive (the one the .VHD files are sitting on)

a. Shut down all applications on your host.

b. On your host go to Start/Programs/Accessories/System Tools and run Disk Defrag

c. Do this at least 3 times as well - until it defrags quickly


1 comment:

Scott Hanselman said...

I like this automated (and cheap) tool: