Blog Stats
  • Posts - 52
  • Articles - 0
  • Comments - 6
  • Trackbacks - 12

 

Optimizing Virtual PC 2004 Hard Disks

If you use Virtual PC 2004 frequently, you are going to notice that the virtual hard disks (.VHD) files growth a lot, as files are saved within the VPC environment, because dynamic VHDs will expand to meet the need of space.

But the VHD do not return the space to the host hard drive once you clean space on it.

For doing so you need to do a set of manual steps:

Steps on the Host OS:

  • Empty the recycle bin on the drive where the VHD is located
  • If the 'hiberfil.sys' file is located in the same drive that the VHD, then disable hibernation
  • Defragment the drive where the VHD is located

Steps on the Virtual Machine OS:

  • Shut down the VPC (do not save state)
  • Install VPC SP1
  • Restart the VPC once SP1 is applied
  • Log on as an Administrator
  • Remove the paging file Clear the temp directory

Defragment the drive Zero the free space on the disk:

  • Capture Virtual Disk Precompactor image, its located at C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\Virtual Disk Precompactor.iso
  • Execute Precompact.exe located on the drive mounted
  • Shut down the VPC (do not save state)

Compress the virtual hard disk:

  • Open Virtual PC Console go to File, Virtual Disk Wizard
  • Select Edit an existing virtual disk
  • Browse to the location and file name of the VHD file
  • Ensure that the Compact option is selected
  • On the Virtual Hard Disk Compaction page, select Replacing the original file
  • Once the disk is compacted, restart the VPC
  • Add the paging file again

Pablo

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

# Compacting Virtual Hard Disks with VPC 2007

Gravatar As I'm putting together the final touches on tommorow's SharePoint security webcast (you should still 12/13/2006 1:37 AM | Fear and Loathing

# re: Optimizing Virtual PC 2004 Hard Disks

Gravatar This was a very useful article, not least easy to follow. Thanks. 8/20/2009 2:49 PM | Nathan Bunting

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

 

 

Copyright © Pablo Galiano