Posted by: martyg | January 5, 2008

Resize Microsoft Virtual Hard Disks

Have you ever created a virtual hard disk and reached the allocated hard disk space?

If the answer is yes, you will be glad to know the problem can be fixed irrespective of the disk type (dynamic or fixed).

In order to accomplish the task you require two tools for resizing and merging. VHD Resizer is a resizing tool that creates an additional partition on a virtual hard disk. Gparted is a disk utility used to merge multiple partitions.

1. Resize a Full Virtual Hard Disk

Figure 1: Resizing virtual hard disk using VHD Resizer

After completion of the resize load the new virtual hard disk into Virtual PC or Virtual Server and view the Disk Management console. Notice how there is an extra 9GB (difference between existing 16384 MB and the 25 GB)

Figure 2: Disk Management Console

2. Merge Disk Partitions

  • Download Gparted from http://gparted-livecd.tuxfamily.org/
  • Capture the Gparted iso image into the virtual machine that requires the disk partitions to be merged
    • Click on CD from the Virtual PC 2007 Console
    • Click Capture ISO Image

Figure 3: Capturing gparted iso image

  • Restart the virtual machine

Figure 4: Gparted boot menu

  • Select Gparted-liveCD Force VESA driver from the boot menu

  • Press Enter on prompt from command line

  • Press Enter on prompt from command line

Figure 5: Merge Disk Partitions

  • Select the main partition using the TAB key
  • Select the resize/move button
  • Press enter

Figure 6: Specify size of merged disks

  • Enter the new size to be equal to the maximum size i.e. 30718    
  • Select the Resize/Move button
  • Press Enter

Figure 7: View Merge Disk

  • Select the Apply button
  • Press Enter

  • Select the Apply button
  • Press Enter

  • Select the Close button
  • Press Enter
Advertisement

Responses

  1. FYI: Using Gparted-liveCD; I was not able to boot my W2K3 server to expand the new disk. I tried many different options.

  2. [...] http://martyg.com.au/2008/01/05/resize-microsoft-virtual-hard-disks/ [...]

  3. I ran disk manager prior to running VHDResize. I already had a unallocated partition. I assumesed this is because I specified a DYNAMIC type of VHD.

    I ran VHDResize without a problem. Grew my VHD just fine. Had a much larger area of unallocated area, which is fine. I tried running gparted on my VHD but no luck :(

    I think I’ll wait to see if the DYNAMIC disk will just grow itself into the unallocated areas.

  4. When using gparted-live-0.4.5-2.iso, it is necessary to use the command option (touch tab) vga=791 noreplace-paravirt to get it to display properly. The vga=791 replaces the default vga command. Also, use the force video option and select a resolution that is compatible with your virtual PC (1024×768, vesa, 16 bit). Worked like a charm once the video was tackled.


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Categories

Follow

Get every new post delivered to your Inbox.