Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virt-Manager Not Connected #41397

Closed
mrtuxa opened this issue Jan 1, 2023 · 15 comments
Closed

Virt-Manager Not Connected #41397

mrtuxa opened this issue Jan 1, 2023 · 15 comments
Labels
question Further information is requested Stale

Comments

@mrtuxa
Copy link

mrtuxa commented Jan 1, 2023

Is this a new report?

Yes

System Info

Void 6.0.15_1 x86_64 AuthenticAMD uptodate FFF

Package(s) Affected

virt-manager

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

Run as normal

Actual behaviour

[mrtuxa@mrtuxa ~]$ virt-manager --debug
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (cli:204) Version 4.1.0 launched with command line: /usr/bin/virt-manager --debug
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (virtmanager:167) virt-manager version: 4.1.0
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (virtmanager:168) virtManager import: /usr/share/virt-manager/virtManager
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (virtmanager:205) PyGObject version: 3.42.2
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (virtmanager:209) GTK version: 3.24.34
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (systray:476) Showing systray: False
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (inspection:206) python guestfs is not installed
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (engine:113) Loading stored URIs:
qemu:///system
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (engine:461) processing cli command uri= show_window=manager domain=
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (engine:464) No cli action requested, launching default window
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (manager:185) Showing manager
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (engine:316) window counter incremented to 1
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (engine:211) Initial gtkapplication activated
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (connection:482) conn=qemu:///system changed to state=Connecting
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (connection:903) Scheduling background open thread for qemu:///system
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (connection:838) conn.close() uri=qemu:///system
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (connection:482) conn=qemu:///system changed to state=Disconnected
[Sun, 01 Jan 2023 21:00:38 virt-manager 2891] DEBUG (engine:179) Autostart connection error: Unable to connect to libvirt qemu:///system.

Verify that the 'libvirtd' daemon is running.

Libvirt URI is: qemu:///system

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 923, 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,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/libvirt.py", line 147, in openAuth
raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

Steps to reproduce

Search on Github and Stackoverflow and Arch Linux Wiki

@mrtuxa mrtuxa added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Jan 1, 2023
@classabbyamp
Copy link
Member

ls -l /var/service? are the virt* services running?

@realcharmer
Copy link
Contributor

realcharmer commented Jan 1, 2023

If you are trying to use libvirt as non-root user, install polkit as well, add your user to the libvirt group and relogin or reboot. This is probably your issue judging by the error message. Also make sure you have the following services enabled and/or running:

  • dbus
  • libvirtd
  • virtlockd
  • virtlogd

@mrtuxa
Copy link
Author

mrtuxa commented Jan 1, 2023

ls -l /var/service? are the virt* services running?

lrwxrwxrwx 1 root root 29 Dec 11 18:46 /var/service -> ../run/runit/runsvdir/current

@mrtuxa
Copy link
Author

mrtuxa commented Jan 1, 2023

If you are trying to use libvirt as non-root user, install polkit as well, add your user to the libvirt group and relogin or reboot. This is probably your issue judging by the error message. Also make sure you have the following services enabled and/or running:

  • dbus
  • libvirtd
  • virtlockd
  • virtlogd

how can i check if the service is running correctly

@classabbyamp
Copy link
Member

ls -l /var/service? are the virt* services running?

lrwxrwxrwx 1 root root 29 Dec 11 18:46 /var/service -> ../run/runit/runsvdir/current

sorry, ls -l /var/service/ (trailing slash is important)

that will show you the currently enabled services

@realcharmer
Copy link
Contributor

how can i check if the service is running correctly

You can check status of services with sv status. All running services are present in /var/service in the form of symbolic links.

@mrtuxa
Copy link
Author

mrtuxa commented Jan 2, 2023

ls -l /var/service/

[mrtuxa@mrtuxa ~]$ ls -l /var/service/
total 0
lrwxrwxrwx 1 root root 13 Oct  1 19:41 acpid -> /etc/sv/acpid
lrwxrwxrwx 1 root root 19 Oct  1 19:41 agetty-tty1 -> /etc/sv/agetty-tty1
lrwxrwxrwx 1 root root 19 Oct  1 19:41 agetty-tty2 -> /etc/sv/agetty-tty2
lrwxrwxrwx 1 root root 19 Oct  1 19:41 agetty-tty3 -> /etc/sv/agetty-tty3
lrwxrwxrwx 1 root root 19 Oct  1 19:41 agetty-tty4 -> /etc/sv/agetty-tty4
lrwxrwxrwx 1 root root 19 Oct  1 19:41 agetty-tty5 -> /etc/sv/agetty-tty5
lrwxrwxrwx 1 root root 19 Oct  1 19:41 agetty-tty6 -> /etc/sv/agetty-tty6
lrwxrwxrwx 1 root root 13 Jan  1 20:11 dbus -> /etc/sv/dbus/
lrwxrwxrwx 1 root root 14 Oct  1 19:41 dhcpcd -> /etc/sv/dhcpcd
lrwxrwxrwx 1 root root 11 Jan  2 10:07 iwd -> /etc/sv/iwd
lrwxrwxrwx 1 root root 16 Jan  1 20:49 libvirtd -> /etc/sv/libvirtd
lrwxrwxrwx 1 root root 15 Jan  1 20:08 lightdm -> /etc/sv/lightdm
lrwxrwxrwx 1 root root 12 Oct  1 19:41 sshd -> /etc/sv/sshd
lrwxrwxrwx 1 root root 13 Oct  1 19:41 udevd -> /etc/sv/udevd
lrwxrwxrwx 1 root root 17 Jan  1 20:49 virtlockd -> /etc/sv/virtlockd
lrwxrwxrwx 1 root root 16 Jan  1 20:49 virtlogd -> /etc/sv/virtlogd
lrwxrwxrwx 1 root root 22 Oct  1 19:41 wpa_supplicant -> /etc/sv/wpa_supplicant

@mrtuxa
Copy link
Author

mrtuxa commented Jan 2, 2023

how can i check if the service is running correctly

You can check status of services with sv status. All running services are present in /var/service in the form of symbolic links.

how can i check if the service is running correctly

You can check status of services with sv status. All running services are present in /var/service in the form of symbolic links.

[root@mrtuxa mrtuxa]# sv status dbus
run: dbus: (pid 861) 200s
[root@mrtuxa mrtuxa]# sv status libvirtd
run: libvirtd: (pid 866) 205s; run: log: (pid 865) 205s
[root@mrtuxa mrtuxa]# sv status virtlockd
run: virtlockd: (pid 864) 209s; run: log: (pid 863) 209s
[root@mrtuxa mrtuxa]# sv status virtlogd
run: virtlogd: (pid 880) 211s; run: log: (pid 878) 211s

@realcharmer
Copy link
Contributor

Well, your services are running. Is your user and group setup properly? Please, refer to the documentation at https://docs.voidlinux.org/config/containers-and-vms/libvirt.html.

@mrtuxa
Copy link
Author

mrtuxa commented Jan 2, 2023

Well, your services are running. Is your user and group setup properly? Please, refer to the documentation at https://docs.voidlinux.org/config/containers-and-vms/libvirt.html.

[mrtuxa@mrtuxa ~]$ groups
mrtuxa wheel floppy audio video cdrom optical kvm plugdev xbuilder

@paper42
Copy link
Member

paper42 commented Jan 2, 2023

[mrtuxa@mrtuxa ~]$ groups
mrtuxa wheel floppy audio video cdrom optical kvm plugdev xbuilder

However, if you have the polkit and dbus packages installed and you enable the dbus service, libvirtd will grant necessary privileges to any user added to the libvirt group.

You are not in the right group.

@mrtuxa
Copy link
Author

mrtuxa commented Jan 2, 2023

[mrtuxa@mrtuxa ~]$ groups
mrtuxa wheel floppy audio video cdrom optical kvm plugdev xbuilder

However, if you have the polkit and dbus packages installed and you enable the dbus service, libvirtd will grant necessary privileges to any user added to the libvirt group.

You are not in the right group.

which is the right group

@realcharmer
Copy link
Contributor

which is the right group

I've mentioned this already. Read the documentation, it's pretty simple.

@paper42 paper42 added question Further information is requested and removed bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Jan 2, 2023
@bugcrazy
Copy link
Contributor

Do you have a polkit authentication agent installed?

Example: polkit-kde-agent; mate-polkit; pantheon-agent; xfce-polkit; polkit-gnome.

@github-actions
Copy link

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Apr 15, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

5 participants