When setting up VMs in VirtualBox, users generally don’t put much thought into how much disk space to assign. However, once you install the Guest OS and start using it regularly, the space tends to get occupied very quickly.

Increasing the amount of disk space assigned to the VMs can be a bit confusing if you’ve never done it before. As such, we’ve detailed the necessary steps to increase the VMs’ disk size in VirtualBox for Windows, Mac, and Linux.

Steps to Increase VirtualBox Disk Size

The process involves adjusting the space allocated to the VM via VirtualBox, matching the increase on the host OS, and finally managing the unallocated space directly through the guest OS.

virtual-media-manager-adjust-size

Step 1: Allocate Space to VM

As stated, you’ll need to allocate a certain amount of disk space to the VM. Here are the steps to do so:

If you’re using a VirtualBox version older than 6, you may instead utilize the command-line steps listed below for resizing. On Linux systems, you can directly use the following command:VBoxManage modifymedium –resize

On Windows, the command is the same. But first, you’ll have to utilize the following command to add VirtualBox to the PATH variable.setx PATH “%PATH%;”

vboxmanage-modifymedium

Step 2: Increase Allocated Space on Host OS

If the VDI is stored on a partition with plenty of free space, you may skip this step. But if the partition where the VDI is stored doesn’t have any free space, the increased space from the previous step won’t be accessible to the VM.

As such, you’ll have to adjust the host OS’s partitions accordingly. We recommendbacking up important filesbefore performing any partitioning tasks.

On Windows, you may utilize the Disk Management tool for this step:

setx-path-virtualbox

On Macs, you may use Disk Utility to manage the partitions:

On Linux, you may use your distro’s built-in partition manager or any other reliable option such as GParted:

Step 3: Modify Partitions in Guest OS

shrink

extend

mac-disk-utility-partition

sudo-apt-get-install-gparted

gparted-resize-delete-partition