How to Extend VMWare Guest's Virtual Disk
How to Extend VMWare Guest Virtual Disk (MS Windows 2003 Server) on VMWare Server Hosted on Microsoft Windows Environment
- Login to your VMWare Server via VMWare Admin Console
- Shut down guest VM with virtual disk that you want to extend - call it YVRTESTSERVER in this case
- Remove (do not Delete it) virtual drive you want to extend from your guest server via VMWare Admin Console
- Locate where the following executable vmware-vdiskmanager is installed at on your VMWare server. Default path is
C:\Program Files (x86)\VMware\VMware Server>
- Locate where your VMWare guest server (YVRTESTSERVER) is located at. In my case it was on separate drive:
E:\Virtual Machines\Windows 2003 R2 - YVRTESTSERVER>
Start Notepad (click on Start, type CMD in the Run field, click OK button)
- Copy and paste the following command into Notepad
vmware-vdiskmanager -x 100GB "E:\Virtual Machines\Windows 2003 R2 - YVRTESTSERVER\DRIVE_FILE_NAME_YOU_WANT_TO_EXTEND.vmdk"
- 100GB is the future size of the virtual disk - adjust to your needs (free space on the disk you are hosting this virtual drive)
- Modify line to reflect the exact file name and path in your environment
- Check the spelling - sorry to bust your 'behind' with extra lines but you know damn well how many times we all mistype the correct path
- Open Command Prompt
- Go to C:\Program Files (x86)\VMware\VMware Server>
- Copy/paste modified command from the Notepad into Command Prompt
- Press Enter and wait. Depending on the size you want to extend to it might take 5-10 min. to complete the task
- Once done you should see:
- Now, log in to VMWare Admin Console
- Shut down any VM guest you won't need for the next 10-20 min. Let's call it SERVER_B. It must be MS Windows 2003
- Once VM guest shut down, add virtual HDD you want to expand (YVRTESTSERVER) to it (SERVER_B)
- Click on Add new hardware, select Hard Disk, click on Use Existing virtual disk, Browse to location where the virtual disk is stored at - (YVRTESTSERVER in our case)
- Start SERVER_B
- Ignore the warning and select Yes
- Log in
- Start Command Prompt
- Type diskpart.exe
- Now type list volume to display the existing volumes on the computer

- Type Select volume volume number - where volume number is number of the volume that you want to extend.
- Type extend [size=n] [disk=n] [noerr]. The following describes the parameters:
size=n
The space, in megabytes (MB), to add to the current partition. If you do not specify a size, the disk is extended to use all the next contiguous unallocated space.
disk=n
The dynamic disk on which to extend the volume. Space equal to size=n is allocated on the disk. If no disk is specified, the volume is extended on the current disk.
noerr
For scripting only. When an error is thrown, this parameter specifies that Diskpart continue to process commands as if the error did not occur. Without the noerr parameter, an error causes Diskpart to exit with an error code.
- Type exit to exit Diskpart.exe.
- Shut down SERVER_B
- Add new hardware - HDD in this case to your VM guest (YVRTESTSERVER- in my case via) VMWare Admin Console
- Start your server and voila
