Error qemu-system-x86_64: -accel kvm: failed to initialize kvm: Permission denied

Bug #2056479 reported by Jānis Kangarooo

This bug report will be marked for expiration in 8 days if no further activity occurs. (find out why)

6
This bug affects 1 person
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-07T18:24:56.855813Z qemu-system-x86_64: -accel kvm: failed to initialize kvm: Permission denied

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
ProcVersionSignature: Ubuntu 6.5.0-21.21~22.04.1-generic 6.5.8
Uname: Linux 6.5.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
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)
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

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.

Changed in virt-manager (Ubuntu):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.