Extend a VirtualBox guest harddisk

Posted on Tue 18 April 2017 in tech

I use VirtualBox for the rare cases when I need a Windows OS. The latest Win10 updates failed to install because there's not enough disk space. Apparently 30GB is not enough for a whole OS and office... ;-(

Luckily that's easy to fix:

  • Shutdown the guest
  • Make sure there are no snapshots of the virtual machine (I read somewhere that it doesnt work with snapshots. Didn't try it myself)
  • Resize the disk: VBoxManage modifyhd VIRTUAL_MACHINE_NAME.vdi --resize 40960
  • Start the guest
  • Extend the C: partition (Right click on the partition in windows disk management)

The above steps resize the disk to 40GB. Don't forget the last step. Otherwise you'll have a 40GB disk but Windows won't be using the whole drive.