参考:https://blog.csdn.net/qq_27657429/article/details/70807099
1、进入cmd
2、进入VirtualBox安装路径
C:\Users\jacksonchen>cd C:\ C:\>cd "Program Files\Oracle\VirtualBox"
3、执行命令
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "E:\CentOS for 2.1flow\CentOS for 2.1flow.vdi" --resize 204800 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
VirtualBox>VBoxManage.exe modifyhd 要修改的vdi文件 --resize 要变成的硬盘大小