VirtualBox增大硬盘容量(guest为Linux)
来源:互联网 发布:凯里欧文生涯数据 编辑:程序博客网 时间:2024/06/07 10:14
原文地址:http://blog.csdn.net/ariesjzj/article/details/7269784
如果virtualbox中的guest系统出现磁盘空间不足的情况,最方便的方法就是将已有硬盘变大。网上能找到不少guest为windows时的扩大硬盘容量的方法,但在guest为linux时又略有不同。其实方法不止一种,下面以virtualbox自带的调整工具为例进行说明。
第一步:
如guest系统的vdi为debian_work.vdi,原大小为10G,现在想要扩大到20G,则到virtualbox安装路径下运行:
vboxmanage modifyhd debian_work.vdi --resize 20000
注:
1. 只有当vdi创建时选的动态扩展才有效。
2. 参数resize后以M为单位,只能比原来的空间大。
3. 实际当中vdi可能会需要加路径。
这是官方文档上的一段说明:
"The --resize option allows you to expand the capacity of an existing image; this increases thelogical size of a virtual disk without affecting the physical size much.[32] This currently works only for the VDI and VHD formats, and only for the dynamically expanding variants. For example, if you originally created a 10G disk which is now full, you can use the --resize command to add more space to the virtual disk without having to create a new image and copy all data from within a virtual machine."
第二步:
如果第一步成功了的话会在virtualbox的管理界面里看到该vdi文件的虚拟大小为20G,但实际大小为10G不到。到guest系统(Linux)中执行
# fdisk -l
会发现/dev/sda中有一块空间是没有分配的,执行
# fdisk /dev/sda
进行分配,根据说明依次输入
n(新建), p(主分区), x(数字,代表/dev/sdax),起末位置一般默认即可,最后w保存退出。
第三步:
重启后看到新建分区(如/dev/sda3),然后将之挂载到某一目录(如/workspace)。先运行
#blkid
得到新建分区/dev/sda3的UUID,然后编辑/etc/fstab,加上
UUID=xxxxxx /workspace ext3 errors =remount-ro 0 1
当中实际的参数请根据需要填写。以后重启完了就可以通过/workspace访问新扩大的磁盘了。
- VirtualBox增大硬盘容量(guest为Linux)
- VirtualBox增大硬盘容量(guest为Linux)
- 增大VirtualBox虚拟硬盘容量
- VirtualBox下Linux为Host,Windows为Guest通信
- 红帽下如何增大硬盘容量
- 为虚拟机linux扩充硬盘容量
- virtualbox(linux host) 调试linux guest 内核
- virtualbox文件共享ubuntu为host机器,win7为guest
- VirtualBox 扩展虚拟硬盘容量
- virtualbox 动态增大虚拟硬盘大小的方法和步骤(linux VM)
- XP(host)与virtualbox中的Fedora 14(guest)Linux共享文件方法
- VirtualBox增大空间方法
- VirtualBox Guest Additions导致Linux不能正常启动
- 如何安装VirtualBox Linux Guest Additions和Xorg配置
- 转:VirtualBox Linux Guest host CPU占用高问题解决!
- virtualbox KALI install guest additions failed because linux-headers-*
- Virtualbox虚拟机Linux Guest的Additions安装方法
- VirtualBox 中 Ubuntu 硬盘容量扩大
- zoj 1854 Election
- 一个页面重构工程师眼中的“用户体验” 【用户体验】
- void *指针
- cf#106(a)(mle)(在组合树节点中定义数组,内存超)
- c++ 类的大小(sizeof)
- VirtualBox增大硬盘容量(guest为Linux)
- Mysql存储过程游标加循环
- Postgresql 9.1新特性
- 为表格添加合计行js代码
- python中module
- wireshark 过滤器使用教程
- 如何在“元素为自定义类型的vector”中查找指定的元素?
- VMWare虚拟机设置固定ip上网方法
- 互联网商业模式:增值还是减值?