Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

60 views
Skip to first unread message

Mario Marietto

unread,
Aug 29, 2023, 6:00:06 PM8/29/23
to

Hello.

I'm running Debian bookworm on my ARM Chromebook,model "xe303c12" and I've recompiled the kernel (5.4) to enable KVM,so now my system sounds like this :


$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm $ uname -a Linux chromarietto 5.4.244-stb-cbe #8 SMP PREEMPT Sat Aug 19 22:19:32 UTC 2023 armv7l GNU/Linux $ uname -r 5.4.244-stb-cbe $ kvm-ok INFO: /dev/kvm exists KVM acceleration can be used $ qemu-system-arm --version QEMU emulator version 5.1.0 (v5.1.0-dirty) Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers $ python3 --version Python 3.11.2

I have installed libvirt 9.7.0,qemu 5.1 and virt-manager from source code with the final goal to be able to connect qemu,kvm and libvirt together to virtualize FreeBSD 13.2 for arm 32 bit. Some useful informations about my platform :


root@chromarietto:/home/marietto/Desktop# virt-host-validate


QEMU: Checking if device /dev/kvm exists                                  : PASS
QEMU: Checking if device /dev/kvm is accessible                           : PASS
QEMU: Checking if device /dev/vhost-net exists                            : PASS
QEMU: Checking if device /dev/net/tun exists                              : PASS
QEMU: Checking for cgroup 'cpu' controller support                        : PASS
QEMU: Checking for cgroup 'cpuacct' controller support                    : PASS
QEMU: Checking for cgroup 'cpuset' controller support                     : PASS
QEMU: Checking for cgroup 'memory' controller support                     : PASS
QEMU: Checking for cgroup 'devices' controller support                    : PASS
QEMU: Checking for cgroup 'blkio' controller support                      : PASS

QEMU: Checking for device assignment IOMMU support                        : WARN 
(No ACPI IORT table found, IOMMU not supported by this hardware platform)

QEMU: Checking for secure guest support                                   : WARN 
(Unknown if this platform has Secure Guest support)

LXC: Checking for Linux >= 2.6.26                                         : PASS
LXC: Checking for namespace ipc                                           : PASS
LXC: Checking for namespace mnt                                           : PASS
LXC: Checking for namespace pid                                           : PASS
LXC: Checking for namespace uts                                           : PASS
LXC: Checking for namespace net                                           : PASS
LXC: Checking for namespace user                                          : PASS
LXC: Checking for cgroup 'cpu' controller support                         : PASS
LXC: Checking for cgroup 'cpuacct' controller support                     : PASS
LXC: Checking for cgroup 'cpuset' controller support                      : PASS
LXC: Checking for cgroup 'memory' controller support                      : PASS
LXC: Checking for cgroup 'devices' controller support                     : PASS

LXC: Checking for cgroup 'freezer' controller support                     : FAIL
(Enable 'freezer' in kernel Kconfig file or mount/enable cgroup controller in your system)

LXC: Checking for cgroup 'blkio' controller support                       : PASS
LXC: Checking if device /sys/fs/fuse/connections exists                   : PASS


# lsmod | grep kvm
no errors (I have embedded the options needed to enable KVM inside the kernel)


# virsh --connect qemu:///system capabilities | grep baselabel

<baselabel type='kvm'>+1002:+1002</baselabel>
<baselabel type='qemu'>+1002:+1002</baselabel>


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

and this is the log that I've got when I ran libvirtd with the debug option enabled


root@chromarietto:~# libvirtd --debug

[Tue, 29 Aug 2023 10:10:11 virt-manager 2141] DEBUG (createvm:494) UEFI found, setting it as default.
[Tue, 29 Aug 2023 10:10:11 virt-manager 2141] DEBUG (createvm:728) Guest type set to os_type=hvm, arch=armv7l, dom_type=kvm
[Tue, 29 Aug 2023 10:10:11 virt-manager 2141] DEBUG (guest:546) Prefer EFI => True
2023-08-29 10:10:12.972+0000: 1765: error : virHostCPUGetKVMMaxVCPUs:1228 : KVM is not supported on this platform: Function not implemented
[Tue, 29 Aug 2023 10:10:12 virt-manager 2141] DEBUG (domcapabilities:250) Error fetching domcapabilities XML
Traceback (most recent call last):
  File "/usr/local/share/virt-manager/virtinst/domcapabilities.py", line 245, in build_from_params
    xml = conn.getDomainCapabilities(emulator, arch,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/libvirt.py", line 4612, in getDomainCapabilities
    raise libvirtError('virConnectGetDomainCapabilities() failed')
libvirt.libvirtError: KVM is not supported on this platform: Function not implemented


2023-08-29 10:10:14.157+0000: 1762: error : virHostCPUGetKVMMaxVCPUs:1228 : KVM is not supported on this platform: Function not implemented

[Tue, 29 Aug 2023 10:10:14 virt-manager 2141] DEBUG (domcapabilities:250) Error fetching domcapabilities XML
Traceback (most recent call last):
  File "/usr/local/share/virt-manager/virtinst/domcapabilities.py", line 245, in build_from_params
    xml = conn.getDomainCapabilities(emulator, arch,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/libvirt.py", line 4612, in getDomainCapabilities
    raise libvirtError('virConnectGetDomainCapabilities() failed')
libvirt.libvirtError: KVM is not supported on this platform: Function not implemented
[Tue, 29 Aug 2023 10:10:14 virt-manager 2141] DEBUG (createvm:497) Error checking for UEFI default
Traceback (most recent call last):
  File "/usr/local/share/virt-manager/virtManager/createvm.py", line 491, in _set_caps_state
    guest.enable_uefi()
  File "/usr/local/share/virt-manager/virtinst/guest.py", line 589, in enable_uefi
    path = self._lookup_default_uefi_path()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/share/virt-manager/virtinst/guest.py", line 848, in _lookup_default_uefi_path
    raise RuntimeError(_("Libvirt version does not support UEFI."))
RuntimeError: Libvirt version does not support UEFI

Can someone give me some suggestions to fix that error ? thanks.

--
Mario.

zithro

unread,
Aug 29, 2023, 7:40:05 PM8/29/23
to
On 29 Aug 2023 23:48, Mario Marietto wrote:

> I'm running Debian bookworm [...]

No you're not.

You're running a MODIFIED Debian version with a (rather old) MODIFIED
kernel :

> $ uname -r
> 5.4.244-stb-cbe
>
> [removed mostly copy/paste from old posts]

> Can someone give me some suggestions to fix that error ? thanks.

Yes, takes me 2 minutes too :

1. open the libvirt source code folder
2. grep the functions in error to get the file names
3. open those files and find out why the functions fail
4. edit code, recompile, test
5. do (4) till the problem is not solved

Also, it's nice to report the bug where you got the disk image, so
others won't waste their time for the same bug.

If you solved your problem, propose a patch, so others may benefit.

HTH !

--
++
zithro / Cyril

Mario Marietto

unread,
Aug 30, 2023, 5:00:07 AM8/30/23
to
Not a useful suggestion for me. I'm not a coder,such as I'm not a pro system admin : this is only a hobby for me. I try to do the best I can,but I can't solve bugs for which a solution has not been found yet and that involves the writing of a piece of code.
--
Mario.

zithro

unread,
Aug 30, 2023, 10:10:06 AM8/30/23
to
Seems you also don't read and/or learn ...
Don't top post please, it's a matter of respect.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

On 30 Aug 2023 10:50, Mario Marietto wrote:
> Not a useful suggestion for me. I'm not a coder,such as I'm not a pro
> system admin : this is only a hobby for me. I try to do the best I can,but
> I can't solve bugs for which a solution has not been found yet and that
> involves the writing of a piece of code.

And yet you continue trying to compile (possibly) incompatible softwares
from source, instead of following the user guides, and despite our warnings.
You essentialy say "I want to do some complicated stuff without
understanding how it works, and quick please".

Have you looked for bug reports for your THREE consecutive problems ?
Why not going plain Debian stable and walk from there ?

Have you checked the compilation flags needed ?
You don't need to be a dev to understand, just spend time reading.

If distros spend a huge amount of time packaging software, it's to
ensure proper compatibility between software versions, including the kernel.
Dumb example :
- compile kernel 4.2
- compile QEMU version 1
- compile libvirt version 9

I'm pretty sure you'll get as "strange" errors as you experienced.
But those errors are not strange, it's just that code get created and
deleted.
If libvirt needs the function "virConnectGetDomainCapabilities()" from
KVM, and the installed version of kernel/KVM does NOT ship this
function, you get those kind of errors.

My advice : look for people who use Linux/BSD -AND- your platform/model
(Chromebook ARM).
Also, if you're not ready to spend time, follow recent guides.

Mario Marietto

unread,
Aug 30, 2023, 8:50:05 PM8/30/23
to
Zithro : And yet you continue trying to compile (possibly) incompatible softwares from source, instead of following the user guides, and despite our warnings. You essentially say "I want to do some complicated stuff without understanding how it works, and quick please".

Are you reading my mind ? How can you know what I say ? I don't say or think what you think I think. My approach is something like this : to understand why I get that error,learning guides is not enough,or at least,I found that learning by doing is a good choice to learn for me. So,the chosen to recompile from scratch everything (Linux kernel,qemu,libvirt and virt-manager) is not a masochistic choice, it is useful for me because doing so,step by step,I will see what happens from a lot of different angles and I can learn the whole procedure evaluating a process at a time. Learning for me is important. If I do what you suggest as is,I will learn a few things,because probably your solution is correct,but I need to make errors before I can understand what's correct and what's not. Can you understand my point ? I spend my time reading,but I can't read everything since I don't know what's relevant and what's not. So before I read something I ask on various forums or ML what I should learn. That's because I need to focus my attention only on the points that are relevant to be able to achieve the project. This is important to avoid reading a lot of useless things that would lead me astray. With that said,I have understood what to do,more or less. I should install a debian version that has a 5.4 kernel on board. I don't know which release could be. I hope that it has a version of qemu minor than 5.2,otherwise it will not work. If it is 5.2 or greater,I don't know what to do. Maybe I will try to recompile qemu 5.1 to see if it can be good with a 5.4 kernel shipped by that version of Debian. For sure I will also install libvirt and virt-manager and the UEFI files from the packages of that distro. I hope you understand that for someone who is learning there are many unknowns to solve. I hope you understand that not everyone has a clear and global vision of what to do and you can't expect to always or almost always deal with experienced people. Finally, I hope you understand that what is simple for you is not or it is less so easy for other users.
--
Mario.
0 new messages