«

»

Apr 30

Adding Disk Space to a VMware Windows Guest

I have had a few questions from clients about how to expand a disk to add additional drive space to Windows virtual machines recently so I figured I would write it up real quick.

It is very easy to add capacity to a virtual hard disk (vmdk) on Windows guest. For a Windows guest running Microsoft Windows 2008 or newer it can be done without any special utilities while the virtual machine is running.

First edit the settings of the virtual machine, select the disk you want to expand, and add the additional capacity needed. The following image shows the edit settings window for a Windows VM where I am increasing the size of the hard disk from 40 GB to 50 GB.

adddiskspace

After the capacity has been added to the vmdk the volume must be extended in Windows. To do this, open Server Manager -> Storage -> Disk Management on the Windows guest. If the new capacity is not shown, running Rescan Disks will discover the added capacity.

rescandisks

The volume can then be extended to consume the additional capacity.

ExtendVolume

You can also follow a similar procedure to add an additional drive to a Windows guest. Instead of expanding an existing drive, a new drive is added in edit settings. When adding the drive configure the capacity, the disk layout, and select the datastore where the new vmdk will be stored.

addharddisk

Once the new drive is added the Windows volume is created using Server Manager -> Storage -> Disk Manager on the Windows guest. Again you may need to Rescan Disks before Windows recognizes the new disk.

If the server is running Windows Server 2003 the ExtPart utility can be used to extend the Windows volume after the vmdk size has been increased.

About the author

vHersey

Hersey Cartwright is an IT professional with extensive experience designing, implementing, managing, and supporting technologies that improve business processes. Hersey is Solutions Architect for SimpliVity covering Virginia, Washington DC, and Maryland. He holds the VMware Certified Design Expert (VCDX-DV #128) certification. Hersey actively participates in the VMware community and was awarded the VMware vExpert title in 2016, 2015, 2014, 2013, and 2012. He enjoys working with, teaching, and writing about virtualization and other data center technologies. Follow Hersey on Twitter @herseyc

3 comments

  1. John

    You should also be able to use diskpart IIRC for 2003SP2/2003r2

    diskpart.exe
    list disk
    (it will print out a bunch of volumes with a number for each)
    select volume [number_of_volume]
    expand
    exit

    If the VM doesn’t have access to the internet

    1. Craig

      I believe you can only use the diskpart command on non System disks, you can’t expand the boot drive on 2003, you would need to power off the VM and boot with something like GParted

      1. vHersey

        You are correct that you can only use diskpart to extend non-System disks while the VM is powered on. However, you can use the ExtPart utility from Dell to extend the boot/system drive of a 2003 server while it is powered on.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

8 − four =