VirtualBox 的虚拟硬盘不够用怎么办
http://forums.virtualbox.org/viewtopic.php?f=1&t=364&start=75新建一个虚拟磁盘:
Firstly create a new vdi, under ~/.VirtualBox/HardDisks
#VBoxManage createhd -filename new.vdi --size 10000 --remember
... See More
This creates a 10Gb VDI.
将旧磁盘的内容clone到新磁盘,注意 --existing 参数
Next you need to clone the VDI, make sure you fully qualify the VDI paths seemed to give me troube when I didn't :-
#VBoxManage clonehd old.vdi new.vdi --existing
把新磁盘加载到虚拟机中,替代旧的
Once cloned you need to attach the new vdi and detach the other.
#VBoxManage modifyvm MyVMName --hda none
#VBoxManage modifyvm MyVMName --hda new.vdi
此时在Guest OS中显示硬盘存在未分配空间,用分区软件修改分区大小即可。
Boot the VM and then check the disk size, shows unallocated space, I then used free Partition Wizzard 5 to resize the partition, booted again to check machine now showed full partition.
删除旧硬盘文件
Now just need to remove and delete the old VDI, again you need to fully qualify the path to the vdi.
#VBoxManage closemedium disk old.vdi
#rm old.vdi
Sorted, I now have an extra 5Gb in my windows VM. You should be able to use the same method for a linux VM to, something like GParted is a free partion tool for linux.
Cheers Steve
页:
[1]