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.
In this case I added 5GB to the initial 20GB.
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).
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
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
This 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.
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.
Reader Comments (7)
There's no need to shutdown the system. Adding diskspace can be done with the machine online.
Hi Petros :)
I know, but I'm one of those 'change-something-(major)-on-Windows-then-do-a-reboot' guys. Also the details (partition information) of the drive under Disk Management didn't refresh properly.
I just ran a test on a new server I created to replace a damaged DC. Worked like a charm. And since I'm more of a UNIX guy than a Windows guy, I love not having to reboot to perform basic tasks :D
Does the extpart.exe work on non-dell systems?
Yes it does. That's the beauty of this little gem :)
brilliant!
If you get the message...
Unable to connect to c: or it does not exist
as I've had on several occasions, run extpart.exe under safemode to make the change