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

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

183 views
Skip to first unread message

Mario Marietto

unread,
Aug 27, 2023, 6:20:06 AM8/27/23
to

Hello.

I'm running Debian bookworm on my ARM Chromebook,model "xe303c12" and I've recompiled the kernel 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. If you ask me why I've recompiled everything from source code,my answer will be complicated,but in short terms,for some unknown reason, it reports an error like this :


"Warning : Failed to set up UEFI / 
The Libvirt version does not support UEFI /
Install options are limited"


So,I went for the most complicated route : compiling everything from scratch.

Below I pasted the whole procedure that I've followed,so you can understand well what's wrong.


$ apt build-dep libvirt

$ git clone https://github.com/libvirt/libvirt.git 
Cloning into 'libvirt'...

$ cd libvirt 
$ meson setup build 
$ ninja -C build 
$ ninja -C build install

$ which virsh
/usr/local/bin/virsh

$ which libvirtd
/usr/local/sbin/libvirtd

$ apt install libgtk-3-dev libpulse-dev libgbm-dev libspice-protocol-dev \
libspice-server-dev libusb-1.0-0-dev libepoxy-dev libfdt-dev

$ git clone -b v5.1.0 http://git.qemu.org/qemu.git

$ cd qemu-v5.1.0

$ git submodule add -f https://git.kernel.org/pub/scm/utils/dtc/dtc.git dtc

$ ./configure --disable-werror --target-list=arm-softmmu \
--enable-opengl --enable-gtk --enable-kvm --enable-guest-agent \
--enable-spice --audio-drv-list="oss pa" --enable-libusb \
--enable-trace-backend=simple --enable-debug

$ make

$ make install

$ git clone https://github.com/virt-manager/virt-manager.git

$ apt install gobject-introspection libosinfo-1.0-0 libosinfo-1.0-dev \
gir1.2-libosinfo-1.0 libvirt-glib-1.0-dev

$ cd virt-manager 
$ ./setup.py configure --prefix=/usr/local 
$ sudo ./setup.py install

$ sudo usermod -a -G libvirt root 
$ sudo usermod -a -G libvirtd root 
$ sudo usermod -a -G libvirt-qemu libvirt-qemu 
$ sudo usermod -a -G libvirt marietto
$ sudo adduser libvirt-qemu 
$ sudo groupadd --system libvirt 
$ sudo groupadd --system libvirt-qemu 
$ sudo newgrp libvirt-qemu 
$ newgrp libvirt

$ /usr/local/sbin# libvirtd & 
[1] 2875

$ /usr/local/sbin# virtqemud & 

info : libvirt version: 9.7.0 info : 
hostname: chromarietto error : virPidFileAcquirePathFull:409 
Failed to acquire pid file : /var/local/run/libvirt/qemu/driver.pid 
Resource temporarily unavailable error : virStateInitialize:672 : 
Initialization of QEMU state driver failed 
Failed to acquire pid file : /var/local/run/libvirt/qemu/driver.pid 
Resource temporarily unavailable error : daemonRunStateInit:617 : 
Driver state initialization failed

$ /usr/local/sbin# ps ax | grep libvirt 
2875 pts/0    Sl     0:00 libvirtd

$ /usr/local/sbin# ps ax | grep virtqemu 
nothing


If I do the opposite way :


$ /usr/local/sbin# virtqemud &

$ /usr/local/sbin# ps ax | grep virtqemu 
3041 pts/0    Sl     0:00 virtqemud

$ /usr/local/sbin# libvirtd & 

info : libvirt version: 9.7.0 info : 
hostname: chromarietto 
error : virPidFileAcquirePathFull:409 
Failed to acquire pid file : /var/local/run/libvirt/qemu/driver.pid 
Resource temporarily unavailable 
virStateInitialize:672 : Initialization of QEMU state driver failed 
Failed to acquire pid file : /var/local/run/libvirt/qemu/driver.pid 
Resource temporarily unavailable daemon
RunStateInit:617 : Driver state initialization failed

$ /usr/local/sbin# ps ax | grep virtqemu 
3041 pts/0    Sl     0:00 virtqemud

$ /usr/local/sbin# ps ax | grep libvirt 
nothing


In short terms : when I launch libvirt and then virtqemu,the first one does not close itself,but the second one does it ; when I launch virtqemud and then libvirt,the first one does not close itself,but the second one does it ; so,these two processes are not compatible with each other,but they should run both,otherwise virt-manager will not work at all and I will not be able to run any virtual machine.

--
Mario.

zithro

unread,
Aug 28, 2023, 12:50:05 PM8/28/23
to
On 27 Aug 2023 12:09, Mario Marietto wrote:
> Hello.
>
> I'm running Debian bookworm on my ARM Chromebook,model "xe303c12" and I've
> recompiled the kernel to enable KVM,so now my system sounds like this :

If you are going to use libvirt, you could also try Xen (via packages),
but I don't know if your device is supported.

> $ uname -a
> Linux chromarietto 5.4.244-stb-cbe
> #8 SMP PREEMPT Sat Aug 19 22:19:32 UTC 2023 armv7l GNU/Linux

Is it normal to get this "old" kernel on bookworm ARM ? No 6.x versions ?

> $ uname -r
> 5.4.244-stb-cbe

uname -r is already in uname -a (-a == all) ;)

> $ 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

bookworm x86 uses QEMU v7 (1:7.2+dfsg-7+deb12u1), so same as above, why
is this old version used ?

> 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. If you ask me why I've recompiled
> everything from source code,my answer will be complicated,but in short
> terms,for some unknown reason, it reports an error like this :

libvirt on bookworm is 9.0.0-4

> "Warning : Failed to set up UEFI /
> The Libvirt version does not support UEFI /
> Install options are limited"

Look for this error message, it may be quicker and less error prone than
compiling everything.


--
++
zithro / Cyril

Christian Britz

unread,
Aug 28, 2023, 1:20:06 PM8/28/23
to
On 28.08.23, 18:44, zithro wrote:
> On 27 Aug 2023 12:09, Mario Marietto wrote:
>> $ uname -a
>> Linux chromarietto 5.4.244-stb-cbe
>> #8 SMP PREEMPT Sat Aug 19 22:19:32 UTC 2023 armv7l GNU/Linux
>
> Is it normal to get this "old" kernel on bookworm ARM ? No 6.x versions ?

This does not seem to be a Debian kernel at all. I get this on my
Raspberry Pi running bookworm:

$ uname -a
Linux raspberrypi 6.1.0-11-arm64 #1 SMP Debian 6.1.38-4 (2023-08-08)
aarch64 GNU/Linux

--
https://www.cb-fraggle.de

zithro

unread,
Aug 28, 2023, 1:30:06 PM8/28/23
to
Yes, in another post today, the OP wrote he was using :

https://github.com/hexdump0815/imagebuilder/releases/download/230220-01/chromebook_snow-armv7l-bookworm.img.gz

The other post is about a kernel wifi driver misbehaving (mwifiex_sdio ...).

So I guess support should be asked there. There may be many differences
between OP's image and a standard Debian.

Mario Marietto

unread,
Aug 28, 2023, 1:30:06 PM8/28/23
to
Sure. It's debian. Uname -a for me is different because I have recompiled the kernel several times. And I can't use 6 on this old netbook if I want to enable kvm. The latest version supported is 5.7. Higher than this qemu will not be recognized by kvm anymore. No problem if you don't want to use kvm ; you can even use 6.x. The image that I've used there is the 6.x onboard,but I have recompiled 5.4.
--
Mario.

Mario Marietto

unread,
Aug 28, 2023, 3:30:06 PM8/28/23
to
Yes.thanks. I've already asked there. The author is busy with different projects,so I tried to look for some help from different sources or the thing will take too long a time.
--
Mario.

Mario Marietto

unread,
Aug 28, 2023, 3:30:06 PM8/28/23
to
Anyway,I found it relevant that I have the error with the wi-fi driver in debian,but not with devuan.
--
Mario.

zithro

unread,
Aug 28, 2023, 5:10:06 PM8/28/23
to
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?

Also, you don't need to reply to me, reply to the list instead.
It means the "To:" field should use "debia...@lists.debian.org".


As per your question :

> Anyway,I found it relevant that I have the error with the wi-fi driver in
> debian,but not with devuan.

Do you know the exact differences between the Debian and Devuan images
provided ?
You should check the kernel and driver versions in the two systems.
0 new messages