IT Intern Blog

IT Challenges Solved

Archive for the ‘Virtual PC’ Category

Resizing a MS Virtual PC Harddrive with Windows

Posted by IT Intern on September 3, 2009

I use Microsoft Virtual PC 2007 for testing pretty much everything, and on the first VPC I made (running Windows XP) I promptly ran out of space on the 5GB I initially assigned it. After searching around, I found a great (free) tool from vmToolkit called VHD Resizer:

This tool is very easy and very handy. It resizes your VPC’s harddrive by essentially copying it to a different file with a larger size. Here’s how to do it:

  1. Make sure your VPC is not running.
  2. Run VHD Resizer and select the harddrive file you need to resize.
    • The full path to the file is now shown under “Source Vhd to Resize”
  3. Under “Destination Vhd” click the “save as” button
    • Choose a different file name for the new harddrive file. The default is to place it in the same directory as the source file.
  4. Choose the type (default is “Dynamic,” which is what you most likely want) and size for the new file.
  5. Click “resize”
    • The file will now begin copying, and will probably take awhile depending on the size of the original file.
  6. When it’s done, close VHD Resizer and open up the Virtual PC Console
  7. Open the Settings for your VPC
  8. Select a Hard Disk with a Current Value of “None”
  9. Enable the “Virtual hard disk file:” radio button and browse to the new file you created.
  10. Save the settings and start up your VPC
  11. Logged on as Administrator, go to Start > My Computer > (right-click) Manage > Disk Management
  12. You should see two volumes:
    • C:, which is your original harddrive file
    • A new volume that has two parts, a healthy part of the same size as the original and an unallocated part
  13. Close Disk Management and go to Start > Run > “diskpart.exe”
  14. You will see a command prompt with “DISKPART>”. Do the following:
    • Enter the command “list volume” (no quotes)
    • From the list of volumes, note the volume number of the new drive
    • Enter the command “select volume X” where X is the new drive number
    • You will see a message that the volume has been selected.
    • Enter the command “extend”
    • After a few seconds, you will see a message that the volume has been extended.
    • Close the command prompt.
  15. Go back into Disk Management and you should now see volume C: and the new volume with only one part of the new size.
  16. Shut down the VPC.
  17. Open the Virtual PC Console and go to the Settings of your VPC.
  18. Select the new Hard Disk that you added and revert it to the “None” radio button selected.
  19. Select the main Hard Disk and change the path to the new file.
  20. Start your VPC.
  21. The VPC should start as normal. After you log in, it will tell you the device has been installed and needs to restart. Go ahead and restart, and now you should be able to log in, go to Disk Management and see your C: drive with the new size available.
  22. You can now delete the old harddrive file.

That’s it! How easy was that? Kudos to vmToolkit for a great tool 🙂


Posted in Virtual PC, Windows | Leave a Comment »