〖Linux〗VirtualBox修改虚拟电脑硬盘(vdi)空间大小
1. 查看需要修改的虚拟硬盘:
[scue@Link:tftpserver]$ vboxmanage list hdds UUID: 79d65850-6846-40c3-a8e7-715b199d1673 Parent UUID: base Format: VDI Location: /media/Source/VirtualBox/Fedora9.vdi State: locked write Type: normal Usage: Fedora9 (UUID: b43e3dd0-60f3-4054-aa98-a5a0b354e2fe) UUID: 422d3782-4818-47d7-8d03-0e86325572a0 Parent UUID: base Format: VDI Location: /media/Source/VirtualBox/WinXP3.vdi State: created Type: normal Usage: WinXP3 (UUID: 42a43120-581e-4a66-aa59-e79c0c43ac3a) UUID: 492fec45-2508-4779-92c8-12a6949fa4d6 Parent UUID: base Format: VDI Location: /media/Source/VirtualBox/Ubuntu.vdi State: created Type: normal Usage: Ubuntu (UUID: cf694a64-bd73-4759-9334-c602a2839db2)
2. 假定需要修改的是 /media/Source/VirtualBox/WinXP3.vdi,UUID是 422d3782-4818-47d7-8d03-0e86325572a0:
[scue@Link:tftpserver]$ vboxmanage modifyhd 422d3782-4818-47d7-8d03-0e86325572a0 --resize $((40*1024)) 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
>>然后就完成了(超级简单,无痛无害,不需要备份Snapshots什么)
3. 测试结果: