Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5383274
  • 博文数量: 890
  • 博客积分: 12876
  • 博客等级: 上将
  • 技术积分: 10760
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-04 14:18
个人简介

猝然临之而不惊,无故加之而不怒。

文章分类

全部博文(890)

文章存档

2016年(1)

2014年(18)

2013年(41)

2012年(48)

2011年(65)

2010年(84)

2009年(121)

2008年(101)

2007年(129)

2006年(95)

2005年(118)

2004年(69)

分类: WINDOWS

2008-09-30 14:56:22

需要强调的一点是,调整硬盘大小之后的效果,相当于增加了原来物理硬盘的柱面数目,因此,文件系统并不会自动增长。需要重新调整文件系统的大小。这一步不同的系统有不同的方法。比如
1. 如果guest  OS为win系列,可以通过partion magic来实现
2. 如果guest  OS为Linux系列,可以通过 resize2fs来扩大ext2/3格式的文件系统。
3. 如果guset OS为其他Unix系统,可以通过向文件树中新增加分区,来扩充原文件系统。
以下为vmware扩展硬盘分区的方法:
vmware安装目录下(可以加到环境变量里面,省的输入这么多)
C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager.exe
在dos提示符下运行,不加任何参数时,给出此程序使用方法:
---------------------------------------------------------------------
VMware Virtual Disk Manager - build 12544.
Usage: vmware-vdiskmanager.exe 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      : 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       : adapter type (ide, buslogic or 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 m:
              (A virtual disk first needs to be mounted at m:
               using the VMware Diskmount Utility.)
-------------------------------------------------------------
修改虚拟硬盘尺寸的参数,有两个.注意上面红色部分.
而楼主需要的应该是下面这句
vmware-vdiskmanager -x 10Gb yourVdisk.vmdk
需要注意的是:
1>注意你虚拟硬盘所在的完整路径里是否有不合法的字符,比如空格.最好在执行此程序前,将您的虚拟硬盘文件移到某个根目录下,以杜绝因为路径不合法而不可操作]的情况.
2>如果有错误,注意查看错误日志来获取帮助,一般日志在C:\Documents and Settings\~user~\Local Settings\Temp\vmware-~user~\vdiskmanager.log
3>很遗憾,虽然此程序功能强大,但这也是惟一一种改变虚拟硬盘大小的工具.

阅读(2602) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~