How to open listener of Libvirt ?

Hi,every one: My Ubuntu is : 20.04 LTS, and I using libvirtd on it to manage KVM vm, but now I can not open listener function of the libvirtd. SYSTEM SOCKET ACTIVATION The libvirtd daemon is capable of starting in two modes. In the traditional mode, it will create and listen on UNIX sockets itself. If the --listen parameter is given, it will also listen on TCP/IP socket(s), according to the listen_tcp and listen_tls options in /etc/libvirt/libvirtd.conf In socket activation mode, it will rely on systemd to create and listen on the UNIX, and optionally TCP/IP, sockets and pass them as pre-opened file de� scriptors. In this mode, it is not permitted to pass the --listen parameter, and most of the socket related config options in /etc/libvirt/libvirtd.conf will no longer have any effect. To enable TCP or TLS sockets use either $ systemctl start libvirtd-tls.socket Or $ systemctl start libvirtd-tcp.socket But, on my system, there are no such service like libvirtd-tls.socket or libvirtd-tcp.socket. root@ubts1:~# systemctl | grep libvirt libvirt-guests.service loaded active exited Suspend/Resume Running libvirt Guests libvirtd.service loaded active running Virtualization daemon libvirtd-admin.socket loaded active running Libvirt admin socket libvirtd-ro.socket loaded active running Libvirt local read-only socket libvirtd.socket loaded active running Libvirt local socket How can I open the listener ? Thanks!

On Thu, 2020-12-24 at 13:38 +0800, tommy wrote:
Hi,every one:
My Ubuntu is : 20.04 LTS, and I using libvirtd on it to manage KVM vm, but now I can not open listener function of the libvirtd.
SYSTEM SOCKET ACTIVATION The libvirtd daemon is capable of starting in two modes.
In the traditional mode, it will create and listen on UNIX sockets itself. If the --listen parameter is given, it will also listen on TCP/IP socket(s), according to the listen_tcp and listen_tls options in /etc/libvirt/libvirtd.conf
In socket activation mode, it will rely on systemd to create and listen on the UNIX, and optionally TCP/IP, sockets and pass them as pre-opened file de‐ scriptors. In this mode, it is not permitted to pass the --listen parameter, and most of the socket related config options in /etc/libvirt/libvirtd.conf will no longer have any effect. To enable TCP or TLS sockets use either
$ systemctl start libvirtd-tls.socket
Or
$ systemctl start libvirtd-tcp.socket
But, on my system, there are no such service like libvirtd-tls.socket or libvirtd-tcp.socket.
root@ubts1:~# systemctl | grep libvirt libvirt-guests.service loaded active exited Suspend/Resume Running libvirt Guests libvirtd.service loaded active running Virtualization daemon libvirtd-admin.socket loaded active running Libvirt admin socket libvirtd-ro.socket loaded active running Libvirt local read-only socket libvirtd.socket loaded active running Libvirt local socket
How can I open the listener ?
On my machine: $ systemctl list-unit-files | grep libvirt libvirt-guests.service enabled enabled libvirtd.service enabled enabled libvirtd-admin.socket enabled enabled libvirtd-ro.socket enabled enabled libvirtd-tcp.socket disabled enabled libvirtd-tls.socket disabled enabled libvirtd.socket enabled enabled This is Debian, but the Ubuntu package is pretty much identical, so I don't expect it to behave differently. So the unit exists on you system, you just need to enable it :) -- Andrea Bolognani / Red Hat / Virtualization

But there are not such services: libvirtd-tcp.socket libvirtd-tls.socket I really not understand how to enable them.:) Should I reinstall libvirtd on my Ubuntu OS, or should I only need install the missing packages about the two services ? Thanks. -----Original Message----- From: Andrea Bolognani <abologna@redhat.com> Sent: Monday, January 4, 2021 5:08 PM To: tommy <sz_cuitao@163.com>; libvirt-users@redhat.com Subject: Re: How to open listener of Libvirt ? On Thu, 2020-12-24 at 13:38 +0800, tommy wrote:
Hi,every one:
My Ubuntu is : 20.04 LTS, and I using libvirtd on it to manage KVM vm, but now I can not open listener function of the libvirtd.
SYSTEM SOCKET ACTIVATION The libvirtd daemon is capable of starting in two modes.
In the traditional mode, it will create and listen on UNIX sockets itself. If the --listen parameter is given, it will also listen on TCP/IP socket(s), according to the listen_tcp and listen_tls options in /etc/libvirt/libvirtd.conf
In socket activation mode, it will rely on systemd to create and listen on the UNIX, and optionally TCP/IP, sockets and pass them as pre-opened file de‐ scriptors. In this mode, it is not permitted to pass the --listen parameter, and most of the socket related config options in /etc/libvirt/libvirtd.conf will no longer have any effect. To enable TCP or TLS sockets use either
$ systemctl start libvirtd-tls.socket
Or
$ systemctl start libvirtd-tcp.socket
But, on my system, there are no such service like libvirtd-tls.socket or libvirtd-tcp.socket.
root@ubts1:~# systemctl | grep libvirt libvirt-guests.service loaded active exited Suspend/Resume Running libvirt Guests libvirtd.service loaded active running Virtualization daemon libvirtd-admin.socket loaded active running Libvirt admin socket libvirtd-ro.socket loaded active running Libvirt local read-only socket libvirtd.socket loaded active running Libvirt local socket
How can I open the listener ?
On my machine: $ systemctl list-unit-files | grep libvirt libvirt-guests.service enabled enabled libvirtd.service enabled enabled libvirtd-admin.socket enabled enabled libvirtd-ro.socket enabled enabled libvirtd-tcp.socket disabled enabled libvirtd-tls.socket disabled enabled libvirtd.socket enabled enabled This is Debian, but the Ubuntu package is pretty much identical, so I don't expect it to behave differently. So the unit exists on you system, you just need to enable it :) -- Andrea Bolognani / Red Hat / Virtualization

On Mon, 2021-01-04 at 17:22 +0800, tommy wrote:
Andrea Bolognani wrote:
On Thu, 2020-12-24 at 13:38 +0800, tommy wrote:
But, on my system, there are no such service like libvirtd-tls.socket or libvirtd-tcp.socket.
root@ubts1:~# systemctl | grep libvirt libvirt-guests.service loaded active exited Suspend/Resume Running libvirt Guests libvirtd.service loaded active running Virtualization daemon libvirtd-admin.socket loaded active running Libvirt admin socket libvirtd-ro.socket loaded active running Libvirt local read-only socket libvirtd.socket loaded active running Libvirt local socket
How can I open the listener ?
On my machine:
$ systemctl list-unit-files | grep libvirt libvirt-guests.service enabled enabled libvirtd.service enabled enabled libvirtd-admin.socket enabled enabled libvirtd-ro.socket enabled enabled libvirtd-tcp.socket disabled enabled libvirtd-tls.socket disabled enabled libvirtd.socket enabled enabled
This is Debian, but the Ubuntu package is pretty much identical, so I don't expect it to behave differently.
So the unit exists on you system, you just need to enable it :)
But there are not such services:
libvirtd-tcp.socket libvirtd-tls.socket
I really not understand how to enable them.:)
Should I reinstall libvirtd on my Ubuntu OS, or should I only need install the missing packages about the two services ?
Please don't top post on libvirt mailing lists. libvirtd.socket exists on your system, and libvirtd-{tcp,tls}.socket are part of the same package (libvirt-daemon-system): https://packages.ubuntu.com/focal/amd64/libvirt-daemon-system/filelist So, unless you've gone out of your way to delete the corresponding files, they will be there. What does $ systemctl status libvirtd-{tcp,tls}.socket tell you? And what the output of $ ls -l /lib/systemd/system/libvirtd-{tcp,tls}.socket look like? -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
tommy