libvirtd: failed to connect to socket after installation
Carlos Bilbao
carlos.bilbao at amd.com
Tue Sep 6 17:50:22 UTC 2022
On 8/30/22 15:34, Peter Krempa wrote:
> On Tue, Aug 30, 2022 at 14:13:36 -0500, Carlos Bilbao wrote:
>> Hello,
>>
>> I am trying to test some changes made to libvirt. I tried compiling and
>> installing, following the available documentation, with:
>>
>> ninja -C build clean
>> meson build --prefix=$HOME/usr
>> ninja -C build -Dsystem=true
> note that the '-Dsystem=true' argument is supposed to be used with
> 'meson' as it sets up configure time options. This way it probably did
> nothing.
Noted, thanks!
>> sudo ninja -C build install
>>
>> After doing this, I try to run virt-install and get the following error on
>> the active libvirtd daemon:
>>
>> Failed to connect socket to '/var/local/run/libvirt/virtqemud-sock': No
>> such file or directory
>>
>> Indeed, that file does not exist:
>>
>> $ ls /var/local/run/libvirt/
>> common hostdevmgr lockd lxc network nwfilter nwfilter-binding secrets
>> storage
> So the directory really looks like libvirtd/virtqemud or any other of
> the libvirt daemons never ran.
>
> How did you start the daemons, did they log something?
So, what I did this time was:
$ ninja -C build clean
$ meson build --reconfigure --prefix=$HOME/usr -Dsystem=true
$ ninja -C build
$ sudo ninja -C build install
$ systemctl stop libvirtd
$ systemctl start libvirtd
but I still get:
$ virt-install --name ubuntu-sev --boot
loader=/usr/share/OVMF/OVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/usr/share/OVMF/OVMF_VARS.fd,loader_secure=no
--vcpus 8 --memory 4096 --memtune hard_limit=16777216 --disk
pool=default,device=disk,size=32,format=raw --controller
type=scsi,model=virtio-scsi --network bridge=virbr0,model=virtio
--controller type=virtio-serial --machine q35 --cpu host-passthrough
--cdrom /var/lib/libvirt/images/ubuntu.iso --osinfo detect=on,require=on
--launchSecurity sev,policy=0x00 --graphics none --tpm none
ERROR Failed to connect socket to
'/var/local/run/libvirt/virtqemud-sock': No such file or directory
and the daemon shows the same error:
$ systemctl status libvirtd
○ libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/local/lib/systemd/system/libvirtd.service;
enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2022-09-06 17:43:53 UTC; 1min
57s ago
TriggeredBy: ● libvirtd-admin.socket
● libvirtd-ro.socket
● libvirtd.socket
Docs: man:libvirtd(8)
https://libvirt.org
Process: 2272757 ExecStart=/usr/local/sbin/libvirtd $LIBVIRTD_ARGS
(code=exited, status=0/SUCCESS)
Main PID: 2272757 (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 32768)
Memory: 60.5M
CPU: 49ms
CGroup: /system.slice/libvirtd.service
├─2760 /usr/sbin/dnsmasq
--conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro
--dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
└─2761 /usr/sbin/dnsmasq
--conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro
--dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
Sep 06 17:41:04 host systemd[1]: Starting Virtualization daemon...
Sep 06 17:41:04 host systemd[1]: Started Virtualization daemon.
Sep 06 17:41:53 host libvirtd[2272757]: libvirt version: 8.7.0
Sep 06 17:41:53 host libvirtd[2272757]: hostname: host
Sep 06 17:41:53 host libvirtd[2272757]: Failed to connect socket to
'/var/local/run/libvirt/virtqemud-sock': No such file or directory
Sep 06 17:41:53 host libvirtd[2272757]: End of file while reading data:
Input/output error
>
>> virt-install was working fine before started changing libvirt's source code.
>> I'm working with Ubuntu 22.04 LTS, virsh v8.7.0.
> Generally the most straightforward way is to build distribution packages
> from the tree and install them directly in your system because then you
> avoid issues such as possibly having two libvirtd instances running and
> such.
Does libvirt have any script or tool to ease such process?
Thanks in advance,
Carlos
More information about the libvir-list
mailing list