williamtu / ovs-mlx

OVS smartnic
0 stars 0 forks source link

[SOLVED] Could not access KVM kernel module: Permission denied #3

Open smadaminov opened 4 years ago

smadaminov commented 4 years ago
root@ovs-afxdp:~# virsh start vdpa-test --console
error: Failed to start domain vdpa-test
error: internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied
2020-06-23T22:52:33.954010Z qemu-system-x86_64: failed to initialize KVM: Permission denied
smadaminov commented 4 years ago

By default, the /dev/kvm is owned by the root:root with permissions set to 600. It can be verified by issuing the following command:

# ls -l /dev/kvm
crw------- 1 root root 10, 232 Jun 23 15:54 /dev/kvm

To resolve this problem we can change ownership and permissions of the /dev/kvm:

# chown root:kvm /dev/kvm
# chmod 660 /dev/kvm
# ls -l /dev/kvm
crw-rw---- 1 root kvm 10, 232 Jun 23 15:54 /dev/kvm

Source: link.