Error qemu-system-x86_64: -accel kvm: failed to initialize kvm: Permission denied
This bug report will be marked for expiration in 8 days if no further activity occurs. (find out why)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
virt-manager (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Error starting domain: internal error: qemu unexpectedly closed the monitor: Could not access KVM kernel module: Permission denied
2024-03-
Fix with command in terminal
chown root:kvm /dev/kvm
Then works again
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: virt-manager 1:4.0.0-1
ProcVersionSign
Uname: Linux 6.5.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: KDE
Date: Thu Mar 7 21:18:16 2024
InstallationDate: Installed on 2024-01-05 (62 days ago)
InstallationMedia: Kubuntu 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230807.1)
PackageArchitec
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)
Hello and thanks for reporting a bug.
You shouldn't need to manually chown /dev/kvm. On a fresh Ubuntu Jammy install, I see:
# ls -la /dev/kvm
crw-rw---- 1 root kvm 10, 232 Mar 7 19:41 /dev/kvm
After installing qemu and virt-manager, I still see the proper permissions/ ownership, as expected. Therefore, it looks to me like this could be a local configuration issue. Could you please provide more details about what actions you performed before seeing the error? Also, note that if you're trying to execute qemu using a regular user then you will need to add this user to the kvm group.
Marking the bug as Incomplete for now until we get more details about it.
Thanks.