[Pkg-libvirt-maintainers] Bug#930929: libvirt: is no longer able to use kvm
Raphael Hertzog
hertzog at debian.org
Sat Jun 22 20:56:26 BST 2019
On Sat, 22 Jun 2019, Raphael Hertzog wrote:
> And despite this I still have the error and yet the libvirt-qemu user
> is part of the kvm group:
> $ id libvirt-qemu
> uid=124(libvirt-qemu) gid=130(kvm) groupes=130(kvm),132(libvirt-qemu)
Still I confirm that the libvirt-qemu user is not able to open /dev/kvm.
$ sudo -u libvirt-qemu qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -nographic -machine none,accel=kvm:tcg -qmp unix:/tmp/qmp.monitor,server,nowait
Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize KVM: Permission denied
qemu-system-x86_64: Back to tcg accelerator
^Cqemu-system-x86_64: terminating on signal 2
Running the same command with my personal user works fine.
Looking with strace in this command run as libvirt-qemu gives this:
openat(AT_FDCWD, "/dev/kvm", O_RDWR|O_CLOEXEC) = -1 EACCES (Permission denied)
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x8), ...}) = 0
write(2, "Could not access KVM kernel modu"..., 54Could not access KVM kernel module: Permission denied
) = 54
write(2, "qemu-system-x86_64: failed to in"..., 64qemu-system-x86_64: failed to initialize KVM: Permission denied
) = 64
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/
More information about the Pkg-libvirt-maintainers
mailing list