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:
- Create a new full clone of your VM machine you want to increase in size, ensuring it has no snapshots.
- Open the folder containing your VM files and you should have only one vmdk file.
- 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"
- 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.
- 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
- Click on Disk Management
- Your second hard drive should show as available and the difference in space shows as unpartitioned.
- Ensure this second hard drive has a drive letter, if not, assign it one.
- Open a Command Prompt and type: diskpart
- Thentype list disk and ensure the disk you want to expand is indeed in the list.
- Now type list volume
- 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.
- 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.