Extending Windows 2003 os disk using diskpart and VMware

I use this trick quite often for Windows 2003 machines (this is not needed on Windows 2008 machines, you can use diskpart directly here!)
After time the OS disk grows out it’s free space, usually this happens due to Windows updates or logfiles.
So, here’s how to extend an OS disk of a Windows 2003 machine using diskpart and VMware (ESX 2.0, vSphere, ESX3.5 anything will do):

  1. Shut down the virtual machine in question.
  2. Connect the virtual machine OS disk to another virtual machine, this can be a running virtual machine (please note that you do need to reboot this machine after you are done):- Click edit settings on the running virtual machine.- Click on “Add…” to add hardware to the machine.
    – Select “Hard disk”
    – Select “Use an existing virtual disk”
    – Browse to the virtual disk.
    – Click “Next” and “Finish”

    Your running virtual machine should now look like this:

    10-3-2010 20-44-19

    Click “OK” to apply the settings.

  3. Now go to edit settings again, and change the size of the virtual disk.

    10-3-2010 20-55-36Click “OK” once again.

  4. Now open the console of the running machine. And start a command prompt.
  5. Type “diskpart”.Within diskpart, type “list disk” to display available disks, you should notice the disk with the free space:

    10-3-2010 20-58-31

    Now select that disk, using “select disk 2” (2 being the disk number offcourse..)
    After that, select the appropriate partition, using “select part 1” (1 being the partition number)
    10-3-2010 21-01-03

    Now extend the partition using the “extend” command.

    10-3-2010 21-02-46

    Hooray! 🙂

  6. Now shut down the virtual machine, and remove the added disk. After that you can power on the initial virtual machine.


Hi, I am Maarten and I am the owner of this weblog. I post on various IT subjects that matter in my life as an IT professional.

Recent Posts