如何擴充虛擬機的系統硬盤空間大小

環境介紹:

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工具

打開虛擬機從光盤啓動,進入GParted,KEYMAP什麼都選擇默認的選項,之後就調整分區大小

如何讓虛擬機從光盤啓動呢?

步驟一:

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讓虛擬機從光盤啓動

如何進入虛擬機WMWare的BIOS設置界面

解決步驟

1.打開虛擬機配置文件(.vmx文件),該文件位於所裝虛擬機目錄,

2.在配置文件末尾加上bios.forceSetupOnce = "TRUE"或者bios.bootDelay = "xxxx"(xxxx用具體數字代替,以毫秒爲單位),我用的是bios.bootDelay = "3000",即三秒鐘。

3.啓動系統 ;

4.開始畫面時點擊鼠標進入;

5.此時你可以有3秒鐘的時間從容按下F2鍵,Ok,終於進入了BIOS。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章