Failed to acquire pid file : /var/local/run/libvirt/qemu/driver.pid

since it's the first error listed:
libvirt.libvirtError: KVM is not supported on this platform: Function not implemented
this page suggests some commands to check: https://forums.gentoo.org/viewtopic-t-1115446-start-0.html

some have lots of output, but these two caught my eye:
Code:
deb12xfce@deb12xfce ~> lsmod | grep kvm
kvm_intel             380928  0
kvm                  1146880  1 kvm_intel
irqbypass              16384  1 kvm
deb12xfce@deb12xfce ~> virsh --connect qemu:///system capabilities | grep baselabel
      <baselabel type='kvm'>+64055:+64055</baselabel>
      <baselabel type='qemu'>+64055:+64055</baselabel>
 


this one seems quick and easy to check as well:
Code:
deb12xfce@deb12xfce ~ [1]> sudo virt-host-validate
[sudo] password for deb12xfce: 
  QEMU: Checking for hardware virtualization                                 : PASS
  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 DMAR table found, IOMMU either disabled in BIOS or 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
 
I believed there was no hope to fix that error,but watching the output below,some hopes came back.

Code:
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
 
it does work in the vm. did you also check:
these two caught my eye:
Code:
deb12xfce@deb12xfce ~> lsmod | grep kvm
kvm_intel 380928 0
kvm 1146880 1 kvm_intel
irqbypass 16384 1 kvm
deb12xfce@deb12xfce ~> virsh --connect qemu:///system capabilities | grep baselabel
<baselabel type='kvm'>+64055:+64055</baselabel>
<baselabel type='qemu'>+64055:+64055</baselabel>
 
Code:
# lsmod | grep kvm
no errors.


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

<baselabel type='kvm'>+1002:+1002</baselabel>
<baselabel type='qemu'>+1002:+1002</baselabel>
 
I don't need to have kvm modules,I have embedded the kvm options needed inside the kernel.
 
like this :

CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQFD=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_MMIO=y
CONFIG_HAVE_KVM_MSI=y
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
CONFIG_KVM_VFIO=y
CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_HAVE_KVM_IRQ_BYPASS=y
CONFIG_IRQ_BYPASS_MANAGER=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KVM_ARM_HOST=y
CONFIG_VHOST_NET=m
CONFIG_VHOST=m
 
libvirt.libvirtError: KVM is not supported on this platform: Function not implemented
are you sure? adding these so i can compare easier.
Code:
deb12xfce@deb12xfce ~> grep -i kvm /boot/config-6.1.0-10-amd64
CONFIG_KVM_GUEST=y
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_PFNCACHE=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQFD=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_DIRTY_RING=y
CONFIG_HAVE_KVM_DIRTY_RING_TSO=y
CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=y
CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_HAVE_KVM_MSI=y
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
CONFIG_KVM_VFIO=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_COMPAT=y
CONFIG_HAVE_KVM_IRQ_BYPASS=y
CONFIG_HAVE_KVM_NO_POLL=y
CONFIG_KVM_XFER_TO_GUEST_WORK=y
CONFIG_HAVE_KVM_PM_NOTIFIER=y
CONFIG_KVM=m
CONFIG_KVM_WERROR=y
CONFIG_KVM_INTEL=m
CONFIG_X86_SGX_KVM=y
CONFIG_KVM_AMD=m
CONFIG_KVM_AMD_SEV=y
# CONFIG_KVM_XEN is not set
CONFIG_KVM_EXTERNAL_WRITE_TRACKING=y
CONFIG_PTP_1588_CLOCK_KVM=m
CONFIG_DRM_I915_GVT_KVMGT=m
 
Focus here. This is the problem :

virsh domcapabilities --machine virt --emulatorbin /usr/local/bin/qemu-system-arm

error: failed to get emulator capabilities
error: KVM is not supported on this platform: Function not implemented
 
There is a good news. I hadn't added my user account to the kvm group :) ; now I did it and the error changed :

Code:
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
 
I'm running Debian bookworm on my ARM Chromebook,model "xe303c12" and I've recompiled the kernel to enable KVM
this makes it sound like kvm is available for x86* only. from: https://www.linux-kvm.org/page/Main_Page
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).
also possibly of note:
Code:
deb12xfce@deb12xfce ~> qemu-system-arm -accel help
Accelerators supported in QEMU binary:
tcg
deb12xfce@deb12xfce ~> qemu-system-x86_64 -accel help
Accelerators supported in QEMU binary:
tcg
kvm
deb12xfce@deb12xfce ~> qemu-system-aarch64 -accel help
Accelerators supported in QEMU binary:
tcg
deb12xfce@deb12xfce ~> qemu-system-x86_64-microvm -accel help
Accelerators supported in QEMU binary:
kvm
 
Last edited:
Code:
# qemu-system-arm -accel help

Accelerators supported in QEMU binary:
kvm
tcg
 
Refocus here :

Code:
[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

Code:
[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
 
i'm not sure that makes a difference given:
this makes it sound like kvm is available for x86* only. from: https://www.linux-kvm.org/page/Main_Page
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).
use the word focus all you like, that doesn't change what seems to be a hardware incompatiblity with kvm itself:
libvirt.libvirtError: KVM is not supported on this platform: Function not implemented
i.e. is your system x86?
 
You forgot this part on the error : error : virHostCPUGetKVMMaxVCPUs:1228.

But no,the ARM chromebook runs on arm 32 bit.
 

Members online


Top