One user in the root
group and not in the kvm
group. He can run qemu-system-x86_64 -enable-kvm
with no problem. There is also another user that is not in the root
group but he belongs to kvm
group. However, he can not use -enable-kvm
option! and gets
failed to initialize KVM: Permission denied
What is the fix to fix that?
chown root:kvm /dev/kvm
as root and then try to runqemu
with your user that is member of kvm group.qemu-system-x86_64 -enable-lvm
with success. Then he closed the opened qemu window and ran the command again. Then he receivedpermission denied
!!!udev
rule to get this permission fixed: Create a file named/etc/udev/rules.d/65-kvm.rules
with the contentKERNEL=="kvm", NAME="%k", GROUP="kvm", MODE="0660"
and reload udev rules with the command(as root):udevadm control --reload-rules && udevadm trigger
. This will get this permisson permanent fixed for this device file, and you will be able to issue--enable-kvm
permanently65-kvm.rules
a one liner?root
) and group(kvm
) to that device