You are not logged in.

#1 2025-02-05 06:18:27

padaru1
Member
Registered: 2024-08-17
Posts: 10

[solved] Unable to connect to libvirtd qemu:///system.

edit: I added code tags

I am using virt-manager and whenever I try to connect to QEMU/KVM I get

Unable to connect to libvirtd qemu:///system.

Cannot recv data: Connection reset by peer

Details:

Unable to connect to libvirt qemu:///system.

Cannot recv data: Connection reset by peer

Libvirt URI is: qemu:///system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 932, in _do_open
    self._backend.open(cb, data)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/share/virt-manager/virtinst/connection.py", line 171, in open
    conn = libvirt.openAuth(self._open_uri,
            [valid_auth_options, authcb, cbdata],
            open_flags)
  File "/usr/lib/python3.13/site-packages/libvirt.py", line 147, in openAuth
    raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: Cannot recv data: Connection reset by peer

Last edited by padaru1 (2025-02-07 04:55:00)

Offline

#2 2025-02-05 06:55:52

cryptearth
Member
Registered: 2024-02-03
Posts: 1,336

Re: [solved] Unable to connect to libvirtd qemu:///system.

is virtd running?

Offline

#3 2025-02-06 00:33:28

padaru1
Member
Registered: 2024-08-17
Posts: 10

Re: [solved] Unable to connect to libvirtd qemu:///system.

I started libvirtd


● libvirtd.service - libvirt legacy monolithic daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: disabled)
     Active: active (running) since Wed 2025-02-05 16:27:43 PST; 43s ago
 Invocation: 86fbe3be7da24eca9b5b5bcb2635cda8
TriggeredBy: ● libvirtd.socket
             ● libvirtd-ro.socket
             ● libvirtd-admin.socket
       Docs: man:libvirtd(8)
             [url]https://libvirt.org/[/url]
   Main PID: 906 (libvirtd)
      Tasks: 21 (limit: 32768)
     Memory: 37.2M (peak: 39.2M)
        CPU: 266ms
     CGroup: /system.slice/libvirtd.service
             └─906 /usr/bin/libvirtd --timeout 120

Feb 05 16:27:43 bwekh systemd[1]: Starting libvirt legacy monolithic daemon...
Feb 05 16:27:43 bwekh systemd[1]: Started libvirt legacy monolithic daemon.

now I get this error

Unable to connect to libvirt qemu:///system.

Configuration file syntax error: /etc/libvirt/
libvirt.conf19: expecting a name

Details:

Unable to connect to libvirt qemu:///system.

configuration file syntax error: /etc/libvirt/libvirt.conf:19: expecting a name

Libvirt URI is: qemu:///system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 932, in _do_open
    self._backend.open(cb, data)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/share/virt-manager/virtinst/connection.py", line 171, in open
    conn = libvirt.openAuth(self._open_uri,
            [valid_auth_options, authcb, cbdata],
            open_flags)
  File "/usr/lib/python3.13/site-packages/libvirt.py", line 147, in openAuth
    raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: configuration file syntax error: /etc/libvirt/libvirt.conf:19: expecting a name

Last edited by padaru1 (2025-02-07 01:45:34)

Offline

#4 2025-02-06 06:07:51

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,218

Re: [solved] Unable to connect to libvirtd qemu:///system.

Hi Padaru,

Please use the code tags for your output.

Also, there seems to be a file syntax error at /etc/libvirt/libvirt.conf at line 19.  Can you post your conf or take a look and try again?

Offline

#5 2025-02-06 15:15:01

cryptearth
Member
Registered: 2024-02-03
Posts: 1,336

Re: [solved] Unable to connect to libvirtd qemu:///system.

well - given my libvirt.conf is unmodified and only 18 lines this reads like you added a new line and likely made a typo
as frank already mentioned please check or post your config - and please use code tags (and edit your posts in that regard)

Offline

#6 2025-02-07 01:51:52

padaru1
Member
Registered: 2024-08-17
Posts: 10

Re: [solved] Unable to connect to libvirtd qemu:///system.

I copied this conf because I thought I didn't have the default conf, the conf I got when I installed libvirt was just comments but I don't have that conf anymore.

https://gist.github.com/rmohr/355404d84 … 85a95a85ed

Last edited by padaru1 (2025-02-07 03:39:58)

Offline

#7 2025-02-07 04:25:04

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,218

Re: [solved] Unable to connect to libvirtd qemu:///system.

Please don’t use random configs you find online. That’s a recipe for disaster.

Just grab the default in your system or pull the tarball and look.

https://archlinux.org/packages/extra/x86_64/libvirt/

If you see the contents, it’ll show you where the default conf is. Hope that helps!

Offline

#8 2025-02-07 04:54:06

padaru1
Member
Registered: 2024-08-17
Posts: 10

Re: [solved] Unable to connect to libvirtd qemu:///system.

Thank you! I'll just make my own conf.

Offline

Board footer

Powered by FluxBB