Re: Error : virHostCPUGetKVMMaxVCPUs:1228 : KVM is not supported on this platform: Function not implemented.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/29/23 21:22, Mario Marietto wrote:
> Hello.
> 

> The error that I'm not able to fix is the following one :
> 
> 
> root@chromarietto:~#  virsh domcapabilities --machine virt
> --emulatorbin /usr/local/bin/qemu-system-arm
> 
> 2023-08-29 10:17:59.110+0000: 1763: error : virHostCPUGetKVMMaxVCPUs:1228 :
> KVM is not supported on this platform: Function not implemented ;
> error: failed to get emulator capabilities
> error: KVM is not supported on this platform: Function not implemented
> 
> 
This is the source code that reports that error:

https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virhostcpu.c?ref_type=heads#L1228

Long story short, you are missing kvm.h header. On my system it's
located under: /usr/include/linux/kvm.h and provided by linux-headers
package.

And if you think about it (and take a look at the other implementation
of the function), it kind of makes sense - libvirt opens /dev/kvm and
calls series of ioctl()-s to learn about KVM capabilities. Libvirt
shouldn't hard code values but rather use the ones provided by kernel
header files.

Happy hacking!

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux