关注联楷|返回首页 | 网站案例 | 帮助中心

合作共赢、快速高效、优质的网站建设提供商

上海网站建设 

服务热线:021-61394118

上海联楷科技

如何扩充虚拟机的系统硬盘空间大小

作者:佚名   时间:2012-05-07   分享到:

环境介绍:

1.VMware Workstation 7.10

2.Ubuntu10.10

问题:

虚拟机提示存储空间不足。

解决办法

通过vmware-vdiskmanager工具来修改虚拟机的系统硬盘大小;

 

错误提示一:

D:/Program Files/VMWare Workstation>vmware-vdiskmanager -x 50GB F:/VMWare7

.1/ubuntu 10.10/Ubuntu-000001.vmdk

Diskname or some other argument is missing.

VMware Virtual Disk Manager - build 261024.

Usage: vmware-vdiskmanager.exe OPTIONS <disk-name> | <mount-point>

解决办法:

若路径名中有空格,必须以双引号括起来。

错误提示二:

D:/Program Files/VMWare Workstation>vmware-vdiskmanager -x 50GB "F:/VMWare

7.1/ubuntu 10.10虚拟机/Ubuntu-000001.vmdk"

This disk is part of a snapshot chain in 'F:/ VMWare7.1/ubuntu 10.10/Ubuntu.vmx'.

The selected operation can only be executed on a disk with no snapshots.

原因:

不能有快照文件。该操作只能在没有快照的文件上操作

解决办法:

打开虚拟机,操作【VM-Snapshot Manager--Delete

删除快照文件

 

错误提示三:

D:/Program Files/VMWare Workstation>vmware-vdiskmanager -x 50GB "F:/VMWare

7.1/ubuntu 10.10/Ubuntu-000001.vmdk"

Failed to open the disk 'F:/VMWare7.1/ubuntu 10.10/Ubuntu-000001.

vmdk' : A file was not found (0x1900000004).

Failed to open disk 'F:/VMWare7.1/ubuntu 10.10/Ubuntu-000001.vmdk

' : A file was not found (0x1900000004).

原因:

快照文件删除了,系统又找不到了。

解决办法:

打开虚拟机配置文件Ubuntu.vmx

看到:

scsi0:0.fileName = "Ubuntu.vmdk"

可知道:

要扩充的文件是:F:/VMWare7.1/ubuntu 10.10/Ubuntu-000001.vmdk

 

错误提示四:

D:/Program Files/VMWare Workstation>vmware-vdiskmanager -x 50GB "F:/Jason/VMWare

7.1/ubuntu 10.10/Ubuntu.vmdk"

  Grow: 100% done.

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

原因:

如果源磁盘已经分过区,则必须使用第三方工具来扩充源分区的大小

解决办法:

使用GParted工具

下载地址:

http://cdnetworks-kr-2.dl.sourceforge.net/project/gparted/gparted-live-stable/0.8.1-3/gparted-live-0.8.1-3.iso

如何使用使用GParted工具

打开虚拟机从光盘启动,进入GPartedKEYMAP什么都选择默认的选项,之后就调整分区大小

如何让虚拟机从光盘启动呢?

步骤一:

GParted有几种模式,

一种是Live CD,即启动光盘,提供一个ISO文件,名为gparted-live-0.8.1-3.is,下载该文件后在VMware菜单VM->Removeable Devices->CDROM->Edit,在界面上的Device status标签内选中Connect at power on选项,Connection标签选择'Use ISO image:',选中下载的文件,gparted-live-0.8.1-3.iso

第二种是光盘模式,不过这种模式不能对宿主机进行分区,所以不能用。

步骤二:

设置BIOS让虚拟机从光盘启动

如何进入虚拟机WMWareBIOS设置界面

解决步骤

1.打开虚拟机配置文件(.vmx文件),该文件位于所装虚拟机目录,

2.在配置文件末尾加上bios.forceSetupOnce = "TRUE"或者bios.bootDelay = "xxxx"xxxx用具体数字代替,以毫秒为单位),我用的是bios.bootDelay = "3000",即三秒钟。

3.启动系统

4.开始画面时点击鼠标进入;

5.此时你可以有3秒钟的时间从容按下F2键,Ok,终于进入了BIOS



如没特殊注明,文章均为上海联楷网络原创,转载请注明来自:http://www.linksj.com/contact/20151229/n7529.html

上海联楷网络新闻