Enlarge a Virtual Disk in VirtualBox

      Comments Off on Enlarge a Virtual Disk in VirtualBox

Enlarge a Virtual Disk in VirtualBox

To enlarge a virtual disk in VirtualBox, you’ll need to use the VBoxManage command from a Command Prompt window. First, shut down the virtual machine – ensure its state is set to Powered Off, not Saved.

image

Second, open a Command Prompt window from your Start menu and change to VirtualBox’s program files folder so you can run the command:

cd “C:\Program Files\Oracle\VirtualBox”

image

The following command will operate on the VirtualBox virtual disk located at “C:\Users\Chris\VirtualBox VMs\Windows 7\Windows 7.vdi”. It will resize the virtual disk to 81920 MB (80 GB).

VBoxManage modifyhd “C:\Users\Chris\VirtualBox VMs\Windows 7\Windows 7.vdi” --resize 81920

(Use two dashes before resize in the command above.)

Replace the file path in the command above with the location of the VirtualBox disk you want to resize and the number with the size you want to enlarge the image to (in MB).

image

Note that this process doesn’t enlarge the partition on the virtual hard disk, so you won’t have access to the new space yet – see the Enlarge the Virtual Machine’s Partition section below for more information.