Extend Windows System Partition under VMWare

When working with Virtual Machines (VM's) you probably work with templates (and/or) clones to create new VM's. When you do this, you basically get a fixed drive with this. The size of the drives are basically the size from when you created them in the past. Since people put more and more crap programs in these VM's, you'll need more, and more disk space.

Under VMWare it's relatively simple to add space to a virtual disk (vmdk), or even add an additional disk to the VM. The problem is that this works for creating additional partitions or extend existing NON primary system partitions. This means that you can't enlarge your C: partition, a partition where (under normal circumstances) all your programs are installed.

Disclaimer

Make sure that you have a working backup of the VM which you're trying to expand, and use these instructions at your own risk. I can't be held responsible for anything I describe in the following paragraphs.

Expand your virtual disk

First, make sure that the VM is NOT running. Second, the space you'll be adding appears at the end of the virtual hard disk. This means that when you have two partitions on the disk where your System Partition resides you're out of luck, since space is always added at the end. The free space you're adding needs to be directly located after the system partition.

Open the settings from your VM, and add the amount of extra space you want to add.

VM Disk Settings

In this case I added 5GB to the initial 20GB.

VM Hard Disk new size

After this you can boot the VM.

Verify the additional space under Windows

Log on to the VM and start the Disk Management tool (Right Click on My Computer and select Manage from the pop-up menu).

Microsoft Disk Management

This automagically reveals the additional 5GB I added under the VM settings.

Now we need to add the newly found Gigabytes to the System Drive (C:) with the Dell ExtPart.exe tool.

ExtPart.exe instructions

Dell created a tool for some of their servers a while back, but this tool still seems to work today. You can get the tool at the following download locations:

Extract the tool from the archive to C:\dell\ExtPart

Extract ExtPart.exe

After this, open the command prompt and go to the directory where you extracted ExtPart.exe (in my case: c:\Dell\Extpert).

When you run the tool without any parameters, you'll be asked the following questions:

Volume to extend (drive letter or mount point):

This is usually c:

Size to expand the volume (MB):

This is the size (in MB!!!) you added to the VM Hard Disk. In my case 5GB -> 5000MB

ExtPart.exe

ExtPart.exeThis is all that's necessary for adding the empty space. Reboot the VM and verify the new size of your system partition.

Run the tool with the /? parameter to see all the available command line options.

New system partition of 25GB

Note that in my case there are still several MB's not allocated. This happens sometimes, and is related to the automatic rounding of numbers. I could rerun the tool and add this as well.

Posted on January 22, 2010 and filed under Microsoft, Operating Systems, Software, Tips'n Tricks.