宁波交警app初学理论:vmware?ws磁盘扩容
来源:百度文库 编辑:偶看新闻 时间:2024/04/29 06:08:19
一个虚拟机上的空间不够,需要扩容,因为系统数据文件指定了一个目录,直接用新增一个硬盘加一个分区的方法无法解决。 网上找了下,windows系统的相对容易些。 开始以为用vmware-vdiskmanager命令就可解决:C:\>echo %PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\WbemC:\>set PATH=%PATH%;C:\Program Files\VMware\VMware WorkstationC:\>echo %PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\VMware\V
Mware Workstation C:\>vmware-vdiskmanager
VMware Virtual Disk Manager - build 80004.
Usage: vmware-vdiskmanager.exe OPTIONS |
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 : rename the specified virtual disk; need to
specify destination disk-name
-p : prepare the mounted virtual disk specified by
the drive-letter for shrinking
-q : do not log messages
-r : convert the specified disk; need to specify
destination disk-type
-x : expand the disk to the specified capacity Additional options for create and convert:
-a : (for use with -c only) adapter type (ide, buslogic o
r lsilogic)
-s : capacity of the virtual disk
-t : disk type id 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: vmware-vdiskmanager.exe -c -s 850Mb -a ide -t 0 myIdeDisk.vmdk
ex 2: vmware-vdiskmanager.exe -d myDisk.vmdk
ex 3: vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 0 destinationDisk.vm
dk
ex 4: vmware-vdiskmanager.exe -x 36Gb myDisk.vmdk
ex 5: vmware-vdiskmanager.exe -n sourceName.vmdk destinationName.vmdk
ex 6: vmware-vdiskmanager.exe -k myDisk.vmdk
ex 7: vmware-vdiskmanager.exe -p
(A virtual disk first needs to be mounted at )
C:\>d:D:\>cd win2003D:\win2003>vmware-vdiskmanager -x 25Gb "Windows Server 2003 Enterprise Edition.vmdk"
Using log file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\vmware-Administrator-3287306232\vdiskmanager.log
Grow: 100% done.
The old geometry C/H/S of the disk is: 2610/255/63
The new geometry C/H/S of the disk is: 3263/255/63
Disk expansion completed successfully.WARNING: If the virtual disk is partitioned, you must use a third-party
utility in the virtual machine to expand the size of the
partitions. For more information, see:
http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647 但其实只是扩展了虚拟磁盘,还需要启动虚拟机再继续分区,比较麻烦。 后来采用另外一种办法:使用 VMware Converter V3.0.2, 操作很简单,在step1:Source下Source Data步骤时,选择'select volumes and resize to save and add space',在'New Disk Space'里指定大小即可。 这个方法比较简单,很快就搞定了。 随便研究了下在linux下如何进行磁盘扩容,如果是LVM 想对简单些,如果不是,是单独的一个根分区+ swap,也还简单些,如果多分区,那就麻烦了。