☰ Categories

Linux: Virtualbox virtual disk resize and attachment

At this point resizing a Virtualbox disk image is done from the command line.

* This page assume you have already detached the virtual disk from your virtual machine

To turn a Windows.vdi from a 25 GB drive to a 30 GB drive

1. Start a terminal session
2. change directory to the directory your virtual disk is stored in
3. Enter: VBoxManage modifyhd Windows.vdi –resize 30720

VBoxManage modifyhd virtualdrivename –resize Megabytes

To reattach your virtual disk to a Virtual machine called Windows

1. Start a terminal session
2. change directory to the directory your virtual disk is stored in
3. Enter: VBoxManage storageattach Windows –storagectl “SATA” –device 0 –port 0 –type hdd –medium Windows.vdi