/dev/kvm: permission denied for libvirtd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Install 20.04, patch, install kvm, install cockpit. Attempt to create VM via web UI, appears momentarily then disappears and states no VM's. Querying via virsh shows the VM has been created.
This used to work fine, and seems to have stopped with latest patches as of a week or so back. May have imagined but I think I saw recent patches for libvirtd?
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: cockpit 215-1
ProcVersionSign
Uname: Linux 5.4.0-42-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.6
Architecture: amd64
CasperMD5CheckR
Date: Mon Aug 10 22:22:31 2020
InstallationDate: Installed on 2020-08-10 (0 days ago)
InstallationMedia: Ubuntu-Server 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: cockpit
UpgradeStatus: No upgrade log present (probably fresh install)
Been testing further. Based on errors relating to apparmor tried complain mode for libvirtd followed by reboot and completely disabling apparmor. However no difference and these messages are still in the logs.
Seeing this error in the log:
Unable to open /dev/kvm: Permission denied ./src/util/ virhostcpu. c cInfo 0ab2c4ff8889ee6 5e bb85f42a6bf07a3 b8 REALTIME_ TIMESTAMP 1597131226041764 user-1000. slice/user@ 1000.service/ dbus.service INVOCATION_ ID 8bd95fa9bc554d5 587ed2f307645b7 f0 008b73e6164241c 5bad;i= 3c21;b= 8298d387029b4a0 0ab2c4ff8889ee6 5e;m=17975743; t=5ac9517634db1 ;x=72d57812f6b2 9d92 TIMESTAMP 395794243 TIMESTAMP 1597131226041777
CODE_FILE ../../.
CODE_FUNC virHostCPUGetTs
CODE_LINE 1338
LIBVIRT_CODE 38
LIBVIRT_DOMAIN 0
LIBVIRT_SOURCE util.error
PRIORITY 3
SYSLOG_FACILITY 24
_AUDIT_LOGINUID 1000
_AUDIT_SESSION 2
_BOOT_ID 8298d387029b4a0
_CAP_EFFECTIVE 0
_CMDLINE /usr/sbin/libvirtd --timeout=120
_COMM libvirtd
_EXE /usr/sbin/libvirtd
_GID 1000
_HOSTNAME pdukvm02
_MACHINE_ID b8db10128faf4d6
_PID 1337
_SELINUX_CONTEXT unconfined
_SOURCE_
_SYSTEMD_CGROUP /user.slice/
_SYSTEMD_
_SYSTEMD_OWNER_UID 1000
_SYSTEMD_SLICE user-1000.slice
_SYSTEMD_UNIT user@1000.service
_SYSTEMD_USER_SLICE -.slice
_SYSTEMD_USER_UNIT dbus.service
_TRANSPORT journal
_UID 1000
__CURSOR s=7a07741964f14
__MONOTONIC_
__REALTIME_
Preceded by:
Failed to read AppArmor profiles list '/sys/kernel/ security/ apparmor/ profiles' : Permission denied ./src/security/ security_ apparmor. c 0ab2c4ff8889ee6 5e bb85f42a6bf07a3 b8 REALTIME_ TIMESTAMP 1597131226002371 user-1000. slice/user@ 1000.service/ dbus.service INVOCATION_ ID 8bd95fa9bc554d5 587ed2f307645b7 f0 008b73e6164241c 5bad;i= 3c20;b= 8298d387029b4a0 0ab2c4ff8889ee6 5e;m=1796c0aa; t=5ac951762b718 ;x=9fc636c6f52c 48c2 TIMESTAMP 395755690 TIMESTAMP 1597131226003224
CODE_FILE ../../.
CODE_FUNC profile_status
CODE_LINE 87
LIBVIRT_CODE 38
LIBVIRT_DOMAIN 24
LIBVIRT_SOURCE util.error
PRIORITY 3
SYSLOG_FACILITY 24
_AUDIT_LOGINUID 1000
_AUDIT_SESSION 2
_BOOT_ID 8298d387029b4a0
_CAP_EFFECTIVE 0
_CMDLINE /usr/sbin/libvirtd --timeout=120
_COMM libvirtd
_EXE /usr/sbin/libvirtd
_GID 1000
_HOSTNAME pdukvm02
_MACHINE_ID b8db10128faf4d6
_PID 1337
_SELINUX_CONTEXT unconfined
_SOURCE_
_SYSTEMD_CGROUP /user.slice/
_SYSTEMD_
_SYSTEMD_OWNER_UID 1000
_SYSTEMD_SLICE user-1000.slice
_SYSTEMD_UNIT user@1000.service
_SYSTEMD_USER_SLICE -.slice
_SYSTEMD_USER_UNIT dbus.service
_TRANSPORT journal
_UID 1000
__CURSOR s=7a07741964f14
__MONOTONIC_
__REALTIME_