Posted by: lluppes | November 13, 2008

Microsoft Virtual PC – Resizing the Primary Hard Drive

Did you ever create a virtual PC or get one from somebody else and find that the C: is just too small for what you need to do?  There is not an easy way to change that, but there is a way.
Download the tool VHD Resizer from  It will create a sector-by-sector copy of your existing VHD drive, letting you specify the new size.  Use that tool to copy your existing VHD C: file into a new file sized to 100G or so.  You can specify a very large size if you use the dynamic disk format since it only takes up as much space as it is currently using.
That will create a large “physical” drive, but you are still stuck with your small partition size, so you need to get VPC to expand the partition to use all of the available space on the newly enlarged drive using a little command line magic.
There is a command line utility called “diskpart” in Windows XP (or newer) which gives you a command line version of the Disk Management console, only it has a few extra features.  The one we’re interested in here is the “extend” command, which will change your partition to use all the available space on a disk.  However, this only works if the drive is NOT your system or boot partition.  So — in order to make this work, you will have to boot off your old partition, then run the diskpart command to finish preparing your new drive.
Now that your new expanded drive is ready, you attach the new drive as the D: drive in your virtual PC, then start the PC and go to a command prompt and run these commands
c:\diskpart            runs the utility
list volume            shows you the drives defined in your system
select volume 2              pick whatever volume your new drive is listed as
extend         actually changes your partition size to use all available space
Shutdown the VPC, then change settings so that your C: points to the new 100G drive now.  Restart the VPC and voila – a new large hard drive!

What do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: