LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-27-2023, 08:48 AM   #1
marietto2008
LQ Newbie
 
Registered: May 2020
Posts: 23

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


Hello.

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

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

Code:
"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.

Code:
$ 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.
 
  


Reply

Tags
debian, kvm, libvirt, qemu, qemu kvm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
libvirt/QEMU: changing "save" directory for qemu:///session connection atelszewski Linux - Virtualization and Cloud 0 01-10-2018 02:44 PM
[SOLVED] libvirt: how to lock qemu image disk in qemu:///session ? atelszewski Linux - Virtualization and Cloud 1 12-18-2017 11:23 AM
(20014)Internal error: Error retrieving pid file /var/run/apache2.pid yuri16 Linux - Server 0 07-28-2009 03:11 AM
(bind) named: couldn't open pid file '/var/run/named/named.pid' - any help? samengr Linux - Server 6 04-01-2009 06:22 AM
rm cannot remove /var/run/atd.pid and /var/run/xdm.pid danishmr Linux - Software 1 05-04-2004 08:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration