How To Increase Disk Space On VirtualBox Or VMware

VirtualBox makes it simple to create virtual machines. When you create a virtual machine in VirtualBox or VMware, you must specify disk space that will be used to install the operating system. I frequently allot a disc size that I later need to increase. In this article, we’ll learn to increase the Disk space of any Virtual machine on VirtualBox and VMware.

Increase disk space in VirtualBox and VMware

VirtualBox and VMware are both easy to use utilities. However, for your own safety, I recommend performing these steps on a temporary virtual machine to familiarise yourself with the process. Once you’ve grasped the concept, you can create a backup of your primary virtual machine to avoid data loss.

Increase disk storage in VirtualBox

We can use Virtual Media Manager in VirtualBox to change the size of any disc storage. Make sure you have enough free space on the main hard drive or SSD before proceeding. After that, launch Virtual Media Manager by selecting File > Virtual Media Manager or pressing Ctrl + D.

Virtual Media Manager
Virtual Media Manager

Choose the partition you want to enlarge and use the bottom slider to increase its size. When finished, click Apply and Close. Virtual Media Manager has increased the disk space of the selected disk. But it is not done yet. In order to use this increased space, you must boot GParted iso in the virtual machine and resize the main partition.

Increase disk space in VMware

VMware Workstation
VMware Workstation

Similarly in VMware, we can increase the disk space. Select the virtual machine and open its settings. In Hardware > Hard Disk, click Expand Disk.

VMware machine settings
VMware machine settings

Expand Disk capacity window will open. Enter the new disk size and click Expand. That’s it. The process may take some time.

Expand disk space
Expand disk space

Use Gparted to Resize Installation Space

You cannot resize the installation partition without restarting your computer, just as you cannot on your host machine. Gparted, an easy-to-use partition manager, can be used to restart your computer with tools to resize the root/installation partition.

Simply expanding the partition from the virtual machine will not make that space available in the virtual machine immediately. It must be made usable using tools such as GParted. First download GParted live iso and follow the following instructions –

After downloading the GParted iso, select the virtual machine and open its settings. Go to Storage > Add Optical disk (icon) and select the GParted iso.

Add GParted disk
Add GParted disk

Now go to System > Motherboard and move Optical on top in the Boot Order.

Virtual machine boot order
Virtual machine boot order

The virtual machine is ready to boot with GParted. Finally, start the virtual machine.

GParted boot menu
GParted boot menu

Boot GParted with Default settings. It may take a minute or two to boot and once done, you’ll see the following screen.

GParted partition manager
GParted partition manager

If you have already used GParted on your Linux distribution, this screen should be very familiar. You can see all the partitions that you created during the system installation. As in my case, a 20GB unallocated or empty partition is also available. This is the storage that I increased using Virtual Media Manager.

Now, select the partition you want to enlarge and press the Resize/Move button. To change the size of the partition, use the slider. When you’re finished, click the Resize/Move button to save your changes. This will add the space from 20GB free space to the currently selected partition. Depending on your system and the amount of storage space you want to add, the process may take some time.

Resize partition to increase disk space
Resize partition

Once the resize process is complete, you can boot back into the main system by removing the GParted iso from the virtual machine.

That’s it! You have successfully increased the storage space of the Virtual machine. The procedure is identical to that of the host operating system. When you add a new storage device to your system, you must either create new partitions. If you have any problems, please let me know in the comments section or join our Discord server.

SHARE THIS POST

MassiveGRID Banner

Leave a Reply

Your email address will not be published. Required fields are marked *