LoginSignup
13
11

More than 5 years have passed since last update.

KVMゲストがホストのファイルシステムをマウント

Last updated at Posted at 2014-08-27

参考: Etsukata blog: VirtFS で Qemu ゲストホスト間ファイル共有

VirtManagerでFilesystem設定

VirtManagerにて ハードウェアを追加 -> Filesystem を選択。
以下の様に指定

9p.png

ゲストを落とし設定反映。

ゲストからホストのディレクトリをマウント実施

手動でマウント
sudo mount -t 9p -o trans=virtio tmptag /mnt

OS起動時にマウントするにはrootのcronに@reboot指定すれば良い。

crontab -e
@reboot mount -t 9p -o trans=virtio tmptag /mnt
マウントタグはここからも確認できる
cat /sys/bus/virtio/drivers/9pnet_virtio/virtio4/mount_tag
  • もしくはnfsを使う。

ホストHDDとの性能比まとめ

ホストのHDDを使うのが良さそうですね。

13
11
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
13
11