1. 進入VirtualBox安裝目錄。3d
cd D:\software\Oracle\VirtualBox>
2. 查看虛擬機列表code
D:\software\Oracle\VirtualBox>VBoxManage.exe list hdds UUID: 5f35d1bd-ce25-4851-ac3d-e0a3ffc8a6d4 Parent UUID: base State: created Type: normal (base) Location: D:\VM\20170317.vdi Storage format: VDI Capacity: 8192 MBytes Encryption: disabled UUID: 122f47a2-3cee-4b09-a32a-e046d08fc3e0 Parent UUID: base State: created Type: normal (base) Location: D:\VM\2017031780._.vdi Storage format: VDI Capacity: 8192 MBytes Encryption: disabled
3. 根據UUID修改對應虛擬機磁盤orm
D:\software\Oracle\VirtualBox>VBoxManage.exe modifyhd 5f35d1bd-ce25-4851-ac3d-e0a3ffc8a6d4 --resize 8192 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%