Select Page

How to fix error ‘Could not access KVM kernel module’ in Proxmox, Virtualizor, SolusVM, Redhat, CentOS and Ubuntu

How to fix error ‘Could not access KVM kernel module’ in Proxmox, Virtualizor, SolusVM, Redhat, CentOS and Ubuntu

KVM is a Linux virtualization technology that’s used in many virtualization solutions such as Proxmox, Virtualizor and SolusVM. All major Linux systems like RedHat, CentOS, Debian and Ubuntu have in-built support for KVM.

Bobcares helps VPS providers and server owners setup and maintain virtualization systems through our Server Management services. A common error found during the initial setup of KVM is “Could not access KVM kernel module“.

Today we’ll take a look at the different causes for this error, and how to fix it.

What is the error ‘Could not access KVM kernel module’?

If the KVM module is not enabled in the system due to some reason, it will show the error message ‘Could not access KVM kernel module: No such file or directory‘.

The error message happens during instances like starting a VM in Proxmox VE:

Could not access KVM kernel module error when starting a Proxmox VM

‘Could not access KVM kernel module error’ when starting a Proxmox VM

 

The same error can be shown while executing other KVM related tasks such as taking VM backups. For eg. here’s an error from Proxmox KVM virtual machines.

Error message - Could not access KVM kernel module - in Proxmox

‘Could not access KVM kernel module’ error during backup in Proxmox

 

What causes the error ‘Could not access KVM kernel module’ in Proxmox, Virtualizor, Redhat, CentOS and Ubuntu.

The error Could not access KVM kernel module‘ can occur due to 3 many reasons:

1. CPU does not have virtualization support

For KVM module to work, the CPU of the machine should have virtualization support enabled.

Using ‘lscpu’ command helps to verify whether the CPU supports hardware virtualization:

 

Confirm if processor support virtualizatiob

Confirm if processor support virtualization

 

The given result is for AMD processor. In machines with Intel processor, this virtualization extension name would be shown as Intel VT.

If there is no virtualization support for your processor, then KVM will not work at all in that machine.

GET YOUR SERVER INSTANCES MANAGED BY THE EXPERTS!

2. KVM modules not loaded into the kernel

If the CPU supports virtualization, then check whether the KVM modules are loaded into the kernel. Missing kernel modules can cause the error ‘Could not access KVM kernel module’.

To check if the KVM modules are being loaded, list them using the command:

lsmod | grep kvm

If the module is not listed, try loading the kernel modules for KVM – kvm and kvm_amd / kvm_intel – using ‘modprobe’ command:

Load the KVM modules

Load the KVM modules

 

The module ‘kvm_amd’ is applicable for AMD processors whereas ‘kvm_intel’ is to be loaded for Intel processors.

If the modules are successfully loaded, it will display the modules in ‘lsmod’ output, as shown in the snippet.

3. Virtualization support is not enabled in the BIOS

By default, the virtualization support may not be enabled by all CPU vendors. In such cases, the ‘modprobe kvm’ command will work but ‘modprobe kvm_amd’ will give error.

To check if the virtualization support is disabled in the BIOS, check the ‘dmesg’ output after executing the modprobe command.

If virtualization is disabled in BIOS, it will display the message:

KVM module not enabled in BIOS

KVM module not enabled in BIOS

In such scenarios, we must edit the BIOS settings and enable virtualization support. We’ll see how to do that in both AMD and Intel processors.


Get your server instances stable!

Worried about upgrades and service errors in your servers? Let us help you.

GET IN TOUCH WITH AN EXPERT NOW!

1 Comment

  1. Really helpful! Thank you very much.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Bobcares
Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.
MORE ABOUT BOBCARES