cat /proc/version ✔
Linux version 5.17.1-3-MANJARO (builduser@fv-az47-788) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.38) #1 SMP PREEMPT Thu Mar 31 12:27:24 UTC 2022
# vim /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 = "ユーザー名" ←「ユーザー名」は普段使う一般ユーザーのユーザー名に変える。
# The group for QEMU processes run by the system instance. It can be
# specified in a similar way to user.
group="libvirt" ←グループをlibvirtに変える。
# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
dynamic_ownership = 1 ←コメントアウトを解除。
# vim /etc/libvirt/libvirtd.conf
...
unix_sock_group = "libvirt"
...
unix_sock_ro_perms = "0777" # set to 0770 to deny non-group libvirt users
...
unix_sock_rw_perms = "0770"
...
auth_unix_ro = "none"
...
auth_unix_rw = "none"
...
...
ユーザーをグループに追加
$ sudo gpasswd -a taiki kvm
$ sudo gpasswd -a taiki libvirt