Bug 1213743 - virsh socket connect fail after Modular libvirt change
Summary: virsh socket connect fail after Modular libvirt change
Status: RESOLVED DUPLICATE of bug 1213352
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Virtualization:Other (show other bugs)
Version: Leap 15.5
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: virt-bugs list
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-28 03:21 UTC by Michiya Hagimoto
Modified: 2023-08-01 02:36 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michiya Hagimoto 2023-07-28 03:21:12 UTC
Update to Leap 15.5, change Monolithic libvirt to Modular.

https://libvirt.org/daemons.html

https://documentation.suse.com/zh-cn/sles/15-SP5/html/SLES-all/cha-libvirt-overview.html

after update virsh command connect failt to unix domain socket.

~> sudo virsh list
[sudo] password for koke:
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

I modify /etc/libvirt/libvirt.conf, uncomment default_uri line, virsh works well.

This problem only on Leap line, not on tumbleweed
Comment 1 Lin Ma 2023-07-28 06:08:18 UTC
It should be a duplicate of bug#1213352

@Jim, Would you agree?
Comment 2 James Fehlig 2023-07-28 15:10:01 UTC
Agree it's a duplicate, but might not be visible to the reporter since it's a SLE bug. From comment 10 of that bug:

---
Support for modular daemons can be thought of in two phases. The first phase is making clients aware of modular daemons. They should be able to work equally well with monolithic libvirtd or modular daemons. This phase is what I aim to fix here by building the library with support for modular daemons.

The second phase is switching new deployments from the monolithic libvirtd to modular daemons. This phase has been done in Factory/Tumbleweed and is under consideration for SLE15 SP6 via jira PED-4804.
---

Some workarounds until the fix reaches Leap 15.5:
1. Specify the connection URI directly, e.g. 'virsh -c qemu:///system list'. Optionally add the URI to 'uri_default' in /etc/libvirt/libvirt.conf or in LIBVIRT_DEFAULT_URI env variable to avoid specifying it each time you use virsh or other libvirt client.

2. Enable and start virtproxyd.service. It proxies client connections on the old monolithic socket (/var/run/libvirt/libvirt-sock) to the appropriate modular daemon socket.

*** This bug has been marked as a duplicate of bug 1213352 ***
Comment 3 Michiya Hagimoto 2023-07-28 16:00:35 UTC
Thanks, Yes I didnot see SLE bugs.

OK, I use libvirt.conf default_uri setting for compatible.

virtproxyd is same effect, but it have some compatibility problem for libvirt-guest service on reboot.
all machine is forced terminate.
Comment 4 James Fehlig 2023-08-01 00:34:31 UTC
(In reply to Michiya Hagimoto from comment #3)
> Thanks, Yes I didnot see SLE bugs.
> 
> OK, I use libvirt.conf default_uri setting for compatible.

In the meantime, a libvirt update fixing the issue is available.

> virtproxyd is same effect, but it have some compatibility problem for
> libvirt-guest service on reboot.
> all machine is forced terminate.

A different bug that I can reproduce as well. Looking into it

https://listman.redhat.com/archives/libvir-list/2023-July/241052.html
Comment 5 Michiya Hagimoto 2023-08-01 02:36:16 UTC
Thanks for confirm.

Will add After=virtproxyd.socket on libvirt-guests.service by systemctl edit