Extend the System Partition of a Windows Server 2008 VM

One of the tasks I’ve had to do occassionally is extend the system partition of a Windows 2003 Server VM hosted within an ESX infrastructure. There may be many ways to accomplish the task but the two most common that I have seen have been:

1. Adding the system disk as a second disk in another VM and using diskpart to extend the volume.
2. Boot the VM using the GParted CD ISO to expand the disk.

I was experimenting with some Windows 2008 VMs and I’m happy to say neither method is necessary. In fact, when I used the GParted CD, the process took “forever” and when the VM rebooted, I was told a hardware change was detected. The VM then prompted me to repair the OS.

To increase the size of the disk, shutdown the 2008 VM. After it reboots, all you need do is use diskpart to extend the volume and you’re done!

3 Comments

Filed under Windows Server

3 responses to “Extend the System Partition of a Windows Server 2008 VM

  1. I used to use GParted boot CDs for extending Windows 2003 VM root (C:\) disks, but now I just use a windows 2008 Server boot CD.In vCenter, I shutdown the VM, edit the settings for the VM’s disk, and increase the “Disk size” setting to what I want the new size to be, then boot off the windows 2008 Cd.I choose “repair”, and then choose “command line”, where I run diskpart, select the volume, and just type extend.It usually requires 2 reboots, but is faster than gparted now. GParted is slow now since we are aligning our VM’s partitions to our SAN – it actually moves everything over, copies data, and so on, taking forever.using diskpart maintains the alignment, and allows you to extend the disk without having another vmdk to manage.Cheers,Matt

  2. More than that there is no need to reboot the VM. Just rescan the disks and then do the job with diskpart.

    select disk
    select part
    extend
    extend filesystem

    and you're done. 😀

    Thanks for the good info.

  3. Thanks matt. Your suggestion of using the Server 2008 DVD was the easiest way I could find to do this. Great work!!

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 )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s