Ever run into a situation that a virtual disk drive proved to small after a period of use? You can always add extra new virtual disk drives to provide extra storage for your virtual computer, but what if you require extra free space in one particular drive?
On the other hand, you can favour fixed size VHD files, and later discover you overdimensioned the virtual disk drive. How to make the fixed size VHD file smaller without converting it to the dynamically expanding type?
VHDMount utility and Symantec Ghost saves the day one more time. Here’s the procedure:
- Create a new VHD file of new required size.
-
Mount the old and the new VHD files using VHDMount utility (distributed as a part of Microsoft Virtual Server 2005 R2 SP1):
vhdmount /p /f old.vhd
vhdmount /p /f new.vhdNote: Mounting the VHD files is possible only if the VHD files are not currently in use by any virtual machine or other program.
You should receive a “The Virtual Hard Disk is successfully plugged in as a virtual disk device.” response, followed by a series of “New hardware found” messages. - Run GHOST32 utility, which can be found in the directory where you’ve installed Symantec Ghost. Using the GHOST32 utility, you can “resize while copy” any of the local drives (Local › Disk › To Disk) including virtual ones now mounted. Make sure you choose the destination disk drive that represents the new VHD file, as you can easily overwrite any other local disk drive. Use GDISK32 utility to determine first which one is the new drive if uncertain.
Once transfer is complete you can safely choose not to restart the computer and just exit the GHOST32. - Unmout the VHD files:
vhdmount /u old.vhd
vhdmount /u new.vhd
here is a utility that will save you some time with the vhdmount command. resizes the VHD and file system. worth a look.
http://www.portlock.com/products/leap_frog/