- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2013-7-10 13:30:47
可以通过clone方式修改:
While there is no way to actually switch a VDI between fixed-size and dynamic, you can clone the existing VDI into a new one with different settings with VBoxManage.
VBoxManage clonehd [old-VDI] [new-VDI] --variant Standard
VBoxManage clonehd [old-VDI] [new-VDI] --variant Fixed
If you want to expand the capacity of a VDI, you can do so with
VBoxManage modifyhd [VDI] --resize [megabytes]
Resizing only works for dynamic VDI images. However, you can combine the resize information with the conversion information to expand fixed-size VDIs. (E.g., convert a fixed-size image to dynamic, expand it, and then convert the dynamic image back to a fixed-size image.)
If you want to compact the image as much a possibly, be sure to zero out the free space. This can be done in Linux by using the dd command to write endless zeros to a file and then deleting that file. (With the caveat of the reserved space of EXT and other file systems.)
|
|