2024年1月16日发(作者:)
虚拟机中如何扩展一个虚拟磁盘的大小
(2008-11-27 14:53:52)
转载
标签: 分类: Linux
虚拟机
扩展
硬盘
it
问题的提出:
非常多的虚拟机使用者开始没有能预估到在虚拟机上安装系统后最后需要多少空间,使用了一段时间后发现虚拟机的磁盘空间不够了。怎么去解决呢?
方法一、
在虚拟机配置处增加一个硬盘。
点击 Edit virtual machine settings
点击下一步,增加一块硬盘
接下来就是按照提示操作就可以了。
这个方法不是最好的。增加了一个硬盘,对虚拟机的性能并没有什么太大的影响。
方法二:
使用VMware自身带的工具进行扩展硬盘
1、首先找到VMware的安装路径,从vm的快捷方式的属性去寻找安装路径
在安装文件夹下我们可以看到这个命令:
这个命令必须在命令行下运行。
进入命令行状态。
C:Program FilesVMwareVMware Workstation>
VMware Virtual Disk Manager - build 19175.
Usage: OPTIONS diskName | drive-letter:
Offline disk manipulation utility
Options:
-c : create disk; need to specify other create options
建立一个新的磁盘
-d : defragment the specified virtual disk
磁盘碎片整理
-k : shrink the specified virtual disk
压缩一个指定的磁盘
-n
specify destination disk-name
重新命名磁盘的名称
-p : prepare the mounted virtual disk specified by
the drive-letter for shrinking
-q : do not log messages
-r
destination disk-type
转换磁盘类型
-x
扩展磁盘的容量
Additional options for create and convert:
-a
r lsilogic)
-s
-t
Disk types:
0 : single growable virtual disk
1 : growable virtual disk split in 2Gb files
2 : preallocated virtual disk
3 : preallocated virtual disk split in 2Gb files
The capacity can be specified in sectors, Kb, Mb or Gb.
The acceptable ranges:
ide adapter : [100.0Mb, 950.0Gb]
scsi adapter: [100.0Mb, 950.0Gb]
ex 1: -c -s 850Mb -a ide -t 0
ex 2: -d
ex 3: -r -t 0
dk
示例:
ex 4: -x 36Gb
把的容量扩展到36G
ex 5: -n
ex 6: -k
ex 7: -p m:
(A virtual disk first needs to be mounted at m:
using the VMware Diskmount Utility.)


发布评论