VMware仮想ディスクの拡張
開発環境作成でのメモ。
もともとベースとして使用している『WindowsXP』の仮想マシンで
Cドライブが10GBしかきってなかったので
『Microsoft Visual Studio 2005』をインストールすると「あっぷあっぷ」状態。。。
で、Cドライブを10GBから14GBに拡張した際の手順。
(1)VMwareServerインストールディレクトリにある「vmware-vdiskmanager.exe」
を利用して拡張する。
vmware-vdiskmanager.exe -x 14GB XXXXXX.vmdk
注意点は、当然といえばそうかもしれないが、
拡張するためには拡張したいサイズの空き容量が必要となる。
今回で言えば、10GBを14GBに拡張するのだから、
4GBあればいいのかと思ったが、実際には14GB必要なのだ。
他にもデフラグが出来たり、新規で仮想ディスクを作成したりできる。
---------------------------------------------------------------------------------------
VMware Virtual Disk Manager - build 80187
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 <source-disk> :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 <source-disk> :convert the specified disk; need to specify destination disk-type
-x <new-capacity> :expand the disk to the specified capacity
---------------------------------------------------------------------------------------
(2)この状態で仮想マシンを起動して「コンピュータの管理」-「ディスクの管理」等で確認すると
4GBの未割当領域が確認出来るようになる。
ここからPartitionMagicとかのパーティション操作が出来るツールを利用して
パーティションを拡張すればOK。
今回はオープンソースの『gparted』を利用。
http://gparted.sourceforge.net/
仮想マシン起動時にEscキー押下で『Boot』選択出来るのでCD-ROM起動に変更。
あとはLinuxが起動する際に「言語の選択」「キーマップの選択」とかあるけど
ほぼデフォルト状態で進める。
『gparted』が起動したら、拡張したいパーティションを選択して
GUIベースで操作出来る。
拡張が出来たら再起動して完了!