LoginSignup
2
2

More than 5 years have passed since last update.

VM環境のWindowsでハードディスクの容量が足らなくなたとき

Posted at

VM環境で初期のハードディスクの割り当てが少なくて、動作中に容量が足らなくなってしまった。
VMの仮想マシン設定でハードディスクのサイズを変更しても割り当てのサイズが変更されるだけで、仮想上で実行しているWindowsの容量は未だ変わってくれません。パーティションのボリュームを変更してあげなければなりません。

diskpartコマンドを使う

以下、その手順です。
管理者権限でコマンドプロンプトを開きます。

  • list dis でディスクを確認
  • select disk でディスクを選択
  • list partition でパーティションサイズを確認
  • list volume でボリュームを確認
  • sel vol でボリュームを選択
  • extend で空き領域いっぱいまで拡張
C:\Windows\system32>diskpart

Microsoft DiskPart バージョン 6.1.7601
Copyright (C) 1999-2008 Microsoft Corporation.
コンピューター: xxxxxxxxxxx

DISKPART> list dis

  ディスク      状態           サイズ   空き   ダイナ GPT
  ###                                          ミック
  ------------  -------------  -------  -------  ---  ---
  ディスク 0    オンライン            80 GB    30 GB

DISKPART> select disk 0

ディスク 0 が選択されました。

DISKPART> list partition

  Partition ###  Type                Size     Offset
  -------------  ------------------  -------  -------
  Partition 1    プライマリ               49 GB  1024 KB

DISKPART> list volume

  Volume ###  Ltr Label        Fs    Type        Size     Status     Info
  ----------  --- -----------  ----  ----------  -------  ---------  --------
  Volume 0    D   WD Unlocker  UDF   CD-ROM        30 MB  正常
  Volume 1    C                NTFS  Partition     49 GB  正常       システム


DISKPART> sel vol c:

ボリューム 1 が選択されました。

DISKPART> extend

DiskPart はボリュームを正常に拡張しました。

DISKPART> list volume

  Volume ###  Ltr Label        Fs    Type        Size     Status     Info
  ----------  --- -----------  ----  ----------  -------  ---------  --------
  Volume 0    D   WD Unlocker  UDF   CD-ROM        30 MB  正常
* Volume 1    C                NTFS  Partition     79 GB  正常       システム


DISKPART>

参考

http://www.atmarkit.co.jp/ait/articles/0506/11/news012.html
http://www.atmarkit.co.jp/ait/articles/0812/26/news119.html

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2