How to easily expand a virtual system drive in VMware
So I have read many posts on expanding virtual disks. Its easy enough it seems unless its the system drive, the scenario goes like this; you want to install a new piece of software ( like .NET 4.0) and it wants to install to the system partition and you don't have the option to change it. But you do not have enough free space so you decide to expand the system partition (typically drive "C"). After all its a virtual drive and it should be easy right?
Well if you read enough posts, forums and many websites you'll come to the conclusion that its a huge undertaking and not for the faint of heart.
But that is not true! I have done this many times and it is incredibly easy and you don't need any fancy disk partitioning software; I promise! I'm writing this article because I just read a long page on the Internet at a well know website that went into great detail on the many steps and where to download the specialized software to do it. It frustrated me because there are so many people writing how to articles that don't really seem to know what they are doing. OK so I'll shut up now and get to the steps.
Phase One Expand the Virtual Disk (VDMK) -
1. Shut down you virtual system, the one you are expanding the disk for.
2. Open a command prompt and change the directory to your VMware installation:
![]()
3. Find your VDMK and copy the path;
Note: You will see two ".vdmk" files for the drive you want to expand, one is small (1 kb) that is the virtual drive file that you want to use.

4. Paste that path into your command prompt after the following command: vmware-vdiskmanager -x 30Gb [path to vdmk]
Note: The 30Gb is up to you. that number is the size you want the disk to be, I chose 30 gigs. The [path to vdmk] is the path to your virtual disk file, remember if the disk file name has breaks in it like mine did you need to enclose it in quotes.
5. Press enter and wait for the magic to happen.

Phase Two - expand the partition.
6. Now access a Windows Server 2008 VM on your network (if you don't have one 2003 will work, I'll cover that as well).
7. Open the settings for the Windows Server 2008 VM and click add Drive.
8. Click next.

9. Choose "Use existing virtual disk" on the next screen and click "next".

10. Locate the virtual disk, again choose the 1kb file.

11. Click finish.

12. Choose "Keep Existing Format" (This is very important).

13. Now open server manager on your Windows 2008 box and navigate to "Storage".
14. Expand the "Disk Management" container, right click the container and choose "Rescan Disks".

15. It may take a few minutes but you should see a new disk in the "Disk Manager" window. The status of the drive will be "Healthy (Active, Primary Partition)". You should also see the unallocated free space that you added in the previous steps.
16. Now highlight the new drive and right click it and choose "Extend Volume". This should only take a few seconds to complete.

17. Now open the settings window for the Windows 2008 VM your working in again and highlight the drive you added and click "Remove". That's it your done.

Now restart the Virtual Machine that you expanded the disk for and it should start without problem and your system disk/partition will reflect the new size. I've done this dozens of times and it always works.
If you do not have a Windows 2008 VM to work with you can do the same with Windows 2003 but instead you will need to use the "Diskpart.exe" utility provided with windows. Its virtually the same process as above but after you mount the drive in the second VM you will open a command prompt and type: diskpart
This will change the command prompt to DISKPART>
Then you will type: extend disk=n [size=n] [noerr]
More details on diskpart.exe can be found here: http://support.microsoft.com/kb/300415





