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.
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.
The volume can then be extended to consume the additional capacity.
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.
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.