[GH-ISSUE #575] local instance not connecting #341

Open
opened 2026-02-27 15:58:18 +03:00 by kerem · 1 comment
Owner

Originally created by @stxrlite on GitHub (Mar 12, 2023).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/575

image

Originally created by @stxrlite on GitHub (Mar 12, 2023). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/575 ![image](https://user-images.githubusercontent.com/78002427/224562545-14ddaec0-6806-4e4b-bf8d-0c31d1b1dd29.png)
Author
Owner

@nadermx commented on GitHub (Apr 19, 2023):

I am also running into this issue, Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied which seems to be connected to this issue, https://github.com/retspen/webvirtcloud/issues/504, which says to make sure libvirt is installed and running, which I also verified is up and running on my ubuntu20.04 instance

● libvirtd.service - Virtualization daemon
     Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-04-19 16:38:08 UTC; 23min ago
TriggeredBy: ● libvirtd-admin.socket
             ● libvirtd-ro.socket
             ● libvirtd.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
   Main PID: 1879 (libvirtd)
      Tasks: 19 (limit: 32768)
     Memory: 47.5M
     CGroup: /system.slice/libvirtd.service
             ├─1879 /usr/sbin/libvirtd
             ├─2027 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvi>
             └─2028 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvi>

I also had an apparmor issue in the syslog when it came to libvirt,

libvirtd[29495]: Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied

And I was able to fix that by running

sudo aa-complain /etc/apparmor.d/usr.sbin.libvirtdsudo systemctl restart libvirtd

yet I also still get this when I create a local instance, so unsure what to try from here
Edit:

Okay making more progress, seems this is also related to issue https://github.com/retspen/webvirtcloud/issues/240, and I messed up a few permission issues, so I will update if this solution works, but seems to be first testing to make sure you can run virsh list and get no error, if that still causes no error then try adding www-data user to libvirt group and reboot.

<!-- gh-comment-id:1515079035 --> @nadermx commented on GitHub (Apr 19, 2023): I am also running into this issue, `Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied ` which seems to be connected to this issue, https://github.com/retspen/webvirtcloud/issues/504, which says to make sure libvirt is installed and running, which I also verified is up and running on my ubuntu20.04 instance ``` ● libvirtd.service - Virtualization daemon Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2023-04-19 16:38:08 UTC; 23min ago TriggeredBy: ● libvirtd-admin.socket ● libvirtd-ro.socket ● libvirtd.socket Docs: man:libvirtd(8) https://libvirt.org Main PID: 1879 (libvirtd) Tasks: 19 (limit: 32768) Memory: 47.5M CGroup: /system.slice/libvirtd.service ├─1879 /usr/sbin/libvirtd ├─2027 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvi> └─2028 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvi> ``` I also had an apparmor issue in the syslog when it came to libvirt, ``` libvirtd[29495]: Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied ``` And I was able to fix that by running ``` sudo aa-complain /etc/apparmor.d/usr.sbin.libvirtdsudo systemctl restart libvirtd ``` yet I also still get this when I create a local instance, so unsure what to try from here Edit: Okay making more progress, seems this is also related to issue https://github.com/retspen/webvirtcloud/issues/240, and I messed up a few permission issues, so I will update if this solution works, but seems to be first testing to make sure you can run `virsh list` and get no error, if that still causes no error then try adding `www-data` user to `libvirt` group and reboot.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#341
No description provided.