Virtualization software like VMware and VirtualBox provide an easy way for you to install operating systems in a virtual environment. If you are familiar with VMWare, you will know that you need to specify the maximum disk space while creating the virtual machine. This allows VMware to allot the amount of disk space required for your virtual machine. However, you can easily run out of space if you didn’t allocate enough disk space initially. Here is how you can increase the disk space of a virtual machine in VMWare.
Before doing anything, make sure that you have a good backup of your virtual machine as there is a good chance of something going wrong while expanding the virtual disk file. Moreover, I also assume that you know how to use regular partition management tools.
Note: this tutorial is for VMWare. If you want to do the same for VirtualBox, here is the tutorial to resize disk space in VirtualBox.
Increase Disk Space from Command Line
To increase virtual disk space in VMware from the command line, the first thing you need to do is to shut down or power off the virtual machine (don’t suspend it) and also make sure that there are no snapshots. If you have any previous snapshots, delete them using the VMware snapshot manager.
Now open the Windows command prompt by pressing “Win + R” and type
Navigate to the VMware installation folder. You can generally use the below command to do that on 64-bit systems. Do change the file path if you have installed VMware in another folder.
Now to increase the disk size, execute the below command. Don’t forget to change the disk space (in Gb’s) and the location of the virtual disk file as required. If you have multiple “vmdk” files, then use the file that does not include
-s0 in the file name.
Once you have executed the command, VMware will increase the virtual disk size. The increased disk space will appear as unallocated space in your guest operating system. Use the built-in partition management tool to either extend the system partition or to create a new partition for your files and folders.
Increase Disk Space using VMware GUI
Note: though I’m showing this in the VMware Workstation, the same steps are applicable to VMware Player.
To increase the virtual disk space from the VMware user interface, open the VMware application, select the virtual machine and click on the link “Edit virtual machine settings.” Also, make sure that the virtual machine is powered off and has no snapshots.
The above action will open the virtual machine settings window. Here navigate to the “Hard disk” category and click the option “Expand” under the “Disk Utilities” section.
As soon as you click the button, VMware will open the “Expand Disk Capacity” window. Here enter the disk space you want in GB’s and click on the “Expand” button. For instance, I’ve entered my disk space as 16GB for my Windows XP virtual machine.
With the above action, VMware resizes the disk as required and displays a confirmation message letting you know the same.
Now log in to your guest operating system and use the partition management tool to manage the new unallocated space.
That’s all there is to do, and it is that easy to increase virtual disk size in VMware through command line or the graphical user interface.
Hopefully that helps, and do comment if you face any problems or just to share your thoughts and experiences.
Our latest tutorials delivered straight to your inbox