I’ve allocated 30GB for the Windows 10 VirtualBox virtual machine. That amount of storage was short-lived, I installed Visual Studio and a few other development tools, soon,e I needed to expend/resize the hard disk storage.
I’m running Oracle VM VirtualBox Version 5.1.28, the syntax might change in different version of VirtualBox but the steps are the same:
- Start a Terminal session. Terminal program is located in Applications -> Utilities -> Terminals
- My Windows 10 virtual hard disk is in the .vmdk format so I need to convert it to .vdk format first, else I will receive an error like this:
0%... Progress state: VBOX_E_FILE_ERROR
- Run the follow to convert the virtual disk type:
vboxmanage clonemedium '/Users/username/VirtualBox VMs/Win10/Win10.vmdk' '/Users/username/VirtualBox VMs/Win10/Win10.vdi' --format vdi
- Now resize the disk from 30GB to 50GB
vboxmanage modifymedium '/Users/username/VirtualBox VMs/Win10/Win10.vdi' --resize 50000
The progress bar in Terminal should look like:
I decided to use the .vdi format from now on so I open VirtualBox and updated the storage with the new resized .vdi disk
- Open VM VirtualBox Manager, right click on the virtual machine, then Settings
- Under the storage tab, highlight the old win10.vmdk item, click on the minus sign at the bottom of the screen
- Under the storage tab, click on the plus sign at the right hand side of the screen, select the .vdi from /Users/username/VirtualBox VMs/Win10/Win10.vdi
We are done!