
先日、Hyper-V で仮想マシンを作成したけど、保存場所の初期設定が
- 構成ファイル:C:¥ProgramData¥Microsoft¥Windows¥Hyper-V フォルダ内
- 仮想ハードディスク:C:¥Users¥Public¥Documents¥Hyper-V¥Virtual hard disks フォルダ内
の状態にしていた。
私はCドライブは起動系やプログラムファイルのみにしていて、メモリを500GBくらいにしているので、できれば別ドライブに移したい。

他にDドライブとEドライブを作っているけど、空き容量をみるとDドライブの方に余裕があったので、Dドライブに移動することに。


仮想マシンの保存場所を変更する
Hyper-V Manager を起動する。

右側にある "Hyper V Settings" を選択。

ハードディスクの保存場所のところに "D:\Hyper-V" と記入し、"Apply" を選択。

すると、Dドライブに Hyper-V フォルダが作成される。
次に、左側のServer欄から "Virtual Machines" を選択し、同様に保存場所に "D:\Hyper-V" と記入し、"Apply" を選択。

終わったら、"OK" で終了する。
これで、次から仮想マシンがDドライブの "Hyper-V" のフォルダに保存される事になった。
インストールしていた仮想マシンを移動
既に作っていた仮想マシンを先程作った Dドライブの "Hyper-V" フォルダに移動する。

"Virtual Machines" に入れている "Ubuntu 22.04 LTS" にカーソルをあわせ、右クリックし、"Move" を選択。
"Choose Move Options" が "全て移動" になっている事を確認し、"Next"。

移動フォルダ先をブラウザから選択。

今回は Dドライブの "Hyper-V" フォルダ。

"Finish" で終了。
試しに Dドライブの "Hyper-V" フォルダを開くと、全て移動されていた。
