VirtualBox

VirtualBox

VirtualBox General Commands

VirtualBox: Resize VDI and Extend Linux Partition (Windows)

This guide details how to increase the disk space of a VirtualBox Linux VM.

  1. Resize VDI (Host Machine): Execute the following command in your Command Prompt or Terminal:

    "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "%userprofile%\VirtualBox VMs\Linux\Linux.vdi" --resize 35840

    (Note: The size 35840 is in MB, representing 35GB. Adjust this value as needed.)

  2. Start your Linux VM.

  3. Open GParted. (Install if needed: sudo apt update && sudo apt install gparted)

  4. Right-click your Linux partition and select Resize/Move.

    GParted Resize/Move

  5. Drag the partition boundary to fill the unallocated space.

    GParted Fill Unallocated Space

  6. Click the Apply button.

    GParted Apply Changes