Expand VMWare Windows Virtual Machine Disk Size

Recently, when attempting to install software on a VMWare virtual machine (VM), I needed to expand the disk to have enough space. Searching the net yeilded the answer in a VMWare Knowledge Base article. For my Windows 7 VM, it is a pretty straight forward two step process.

One caveat is the VM cannot have any snapshots. Hence, you will either need to clone the VM or delete all the snapshots before begining this process.

  1. Expand the VMDK

    • Ensure the VM is shut down
    • Go to the VM settings by first selecting the virtual machine in VMWare Workstation and going to VM > Settings
    • In the Settings dialog, under the Hardware tab, select Hard Disk (IDE)
    • On the right side of the dialog, select Utilities > Expand...
    • In the Expand Disk Capacity dialog, specify your desired maximum hard disk size (this takes a few minutes)
  2. Expand the partition in Windows 7 using DiskPart from the command line

Although I prefer PowerShell, a normal command prompt will work fine for this. Just open up one or the other.

C:\Documents and Settings\username>diskpart

Microsoft DiskPart version 5.1.3565
Copyright (C) 1999-2003 Microsoft Corporation.
On computer: BLANK
DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 D CD-ROM 0 B
Volume 1 C NTFS Partition 49 GB Healthy System

DISKPART> select Volume 1
Volume 1 is the selected volume.

DISKPART> extend
DiskPart successfully extended the volume.
Leaving DiskPart...

The VMWare KB article goes into a lot more detail for additional operating systems. If you are like me and using Windows 7, this should do the trick!