Arch LinuxホストのKVMにゲストをインストールしたときのメモ
個人的に設定を忘れないためのメモなので、特に読む必要はない。
前提条件
- systemdでブリッジデバイス作成済み
- 必要なパッケージ類はインストール済み
- https://wiki.archlinux.jp/index.php/OVMF_%E3%81%AB%E3%82%88%E3%82%8B_PCI_%E3%83%91%E3%82%B9%E3%82%B9%E3%83%AB%E3%83%BC#IOMMU_.E3.81.AE.E6.9C.89.E5.8A.B9.E5.8C.96 を読んでいる
virt-managerから起動しようとすると色々permission deniedとかでたので/etc/libvirt/qemu.confの変更
# The user for QEMU processes run by the system instance. It can be # specified as a user name or as a user id. The qemu driver will try to # parse this value first as a name and then, if the name doesn't exist, # as a user id. # # Since a sequence of digits is a valid user name, a leading plus sign # can be used to ensure that a user id will not be interpreted as a user # name. # # Some examples of valid values are: # # user = "qemu" # A user named "qemu" # user = "+0" # Super user (uid=0) # user = "100" # A user named "100" or a user with uid=100 # user = "root" # The group for QEMU processes run by the system instance. It can be # specified in a similar way to user. group="root"
# Path to the setuid helper for creating tap devices. This executable # is used to create <source type='bridge'> interfaces when libvirtd is # running unprivileged. libvirt invokes the helper directly, instead # of using "-netdev bridge", for security reasons. bridge_helper = "/usr/lib/qemu/qemu-bridge-helper"
vnet0にIPv4が割り当てられていないっぽかったので、iptablesの変更
# iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT