Pages Menu
Categories Menu

Posted by on 19th May, 2008

Increase your (VMWare disk) size…

Increase your (VMWare disk) size…

Over the years I have used both Microsoft’s Virtual PC and VMWare. As to which one I prefer and is better, that is a whole other post. In this post I wanted to write about increasing the size of a virtual hard drive of a VMWare machine.

When creating a new machine you are asked to define the size of your drive and when you choose 16Gb, you  think you’ll never use  that much anyways, until, after a while, you realize you do need more. In that case, there are no options to increase the size of your C: drive. Ofcourse, you could always add a new drive (D or E), but that is just more files lingering around, as if VMware didn’t create enough already….

With regards to your OS drive size, you are stuck with the size you chose. No menu options, dialogs, or wizards can increase it…

…unless you do this trick. Thanks to Paul Marshall for outlining these steps.

I have done this a couple of times and have found these steps work almost without fail. One observation, is that apparently the hard drive needs to be assigned a drive letter, or otherwise you cannot extend it. Here are the complete steps:

  1. Create a new full clone of your VM machine you want to increase in size, ensuring it has no snapshots.
  2. Open the folder containing your VM files and you should have only one vmdk file.
  3. Open a Command Prompt and issue the following command, choosing your own size in Gigabytes, followed by the path to the vmdk file: C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x 20Gb "d:\[...]\vmdiskfile.vmdk"
  4. After several minutes, the process completes, however, the disk is not ready yet. You have expanded it, but the newly added space has not been allocated yet and is thus unusable at this point. If the disk is the system volume you will need to mount the disk in a second VM and expand it from there. If its not a system volume do it within the virtual machine it belongs to.
  5. Once you’ve mounted the disk in a different VM or booted up the VM it belongs to if its not the system volume, do the following: click on Start and then right-click on My Computer and select Manage
  6. Click on Disk Management
  7. Your second hard drive should show as available and the difference in space shows as unpartitioned.
  8. Ensure this second hard drive has a drive letter, if not, assign it one.
  9. Open a Command Prompt and type: diskpart
  10. Thentype list disk and ensure the disk you want to expand is indeed in the list.
  11. Now type list volume 
  12. This will show you the drives, their volume number, capacity etc. You now need to select the volume you are about to expand, using the following command. Where n is equal to the number of the volume.
    select volume=n
  13. Once selected, you can now expand it using the extend command. Type extend, and your hard drive is ready. Close your machine (without saving) and start up the VM that this drive is the system volume on and check the size.