#Failed to connect socket to 'var run libvirt virtqemud-sock' No such file or directory
232 messages · Page 1 of 1 (latest)
He doesn't use libvirt (or vms I think)
i don't konw crap about qemu
I know qemu and virt manager but not gentoo lol
seems wrong placement of files
or permissions
What should I try?
did you install qemu and enable libvirtd.service?
actually idk if you have systemd because you're on gentoo, so do you have systemd? lol
you can test it with virsh -c qemu:///system
.aw libvirt
Sorry for delayed response, went to sleep
Yes
I'm using openRC
Idk but you can use qemu without libvirt on open rc with something like this https://github.com/jirutka/qemu-openrc
I use systemd so not sure what your issue is
I don't think I'll use that
I kinda wanna stick to the Gentoo wiki
good idea
Same error.
try virsh -c qemu:///session to test user level
i think your libvert daemon is not working or not connected to qemu somehow
sorry, if you were on arch I could help more, but idk anything about gentoo
I got this
I found this:
- Stopping libvirtd ...
- start-stop-daemon: no matching processes found [ ok ]
- Starting libvirtd ...
sorry idk what that means 😬 must be how openrc daemonizes things
@brave coral Do you understand this? (I don't)
ok hold on
I'm on gentoo using kvm qemu
are you trying to use virt-manager?
they are
also could you try it on normal qemu
just to see if it works or not
Yes
Tried that
error?
Someone on reddit told me it's a permissions error
Same error
could you sow me your libvirtd config
have you done this:
usermod -aG libvirt <your username>
rc-service libvirtd restart
log out and back in to get the new permissions
Tried it, Didn't work
These are my groups btw wheel video kvm libvirt input fluffy
ðŸ˜
it's weird though it only shows one of my VMs
@sleek whalecould you try changing auth_unix_rw = "none" toauth_unix_rw = "polkit"
I have two
and restart libvirtd
I don't have a polkit though
also you need polkit to be installed
do it
Oh I do have one
ok it's weird none of my gnome boxes vms show up in virt-manager
Still isn't working
stat /run/libvirt
File: /run/libvirt
Size: 260 Blocks: 0 IO Block: 4096 directory
Device: 19h/25d Inode: 1317 Links: 11
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-08-13 21:40:28.389999985 -0500
Modify: 2022-08-13 21:40:28.863333302 -0500
Change: 2022-08-13 21:40:28.863333302 -0500
Birth: -
has the right perms
File: /var/run/libvirt/
Size: 260 Blocks: 0 IO Block: 4096 directory
Device: 19h/25d Inode: 1317 Links: 11
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-08-13 21:40:28.389999985 -0500
Modify: 2022-08-13 21:40:28.863333302 -0500
Change: 2022-08-13 21:40:28.863333302 -0500
Birth: -
fluffy@gentoo ~ $
ok
could you change unix sock dir to unix_sock_dir = "/run/libvirt"
And than restart libvirt?
I did find this
- Stopping libvirtd ...
- start-stop-daemon: no matching processes found [ok ]
- Starting libvirtd ... [ ok ]
did it work?
Nope
did you compile libvirt with policykit?
In my use flags?
yes
what did you compile?
what's openrc's equivalent to systemctl status?
Libvirt
rc-status I think
why, did it not have policykit use flag before?
could you show me the status?
O:
ok crashed
What's that 
ls /var/log/libvirt
I don't have that
what's in /var/log
boot dmesg emerge.log lastlog portage/ wtmp Xorg.0.log.old
cups/ emerge-fetch.log .keep lightdm/ sandbox/ Xorg.0.log
could you change log_level to log_level=4 in libvirtd
and check if the directory now exists
Done
looks like it uses virtlogd
https://gitweb.gentoo.org/repo/gentoo.git/tree/app-emulation/libvirt/files/libvirtd.init-r19
need virtlogd
https://gitweb.gentoo.org/repo/gentoo.git/tree/app-emulation/libvirt/files/virtlogd.init-r2
https://gitweb.gentoo.org/repo/gentoo.git/tree/app-emulation/libvirt/files/libvirtd.confd-r5
Browse the Gentoo Git repositories
Browse the Gentoo Git repositories
Browse the Gentoo Git repositories
I installed it I think
I did
is it running?
It shows libvirtd crashed
status?
Yep
usually logging in openrc is defined in output_log, error_log, output_logger, error_logger variables in the init scripts, or conf.d, and in this case none of them are set
It shows this for libvirtd
virtlogd [ started ]
what happens when you run virtlogd from the command line
I cant test this I am on systemd
same
fluffy@gentoo ~ $ doas virtlogd
doas (fluffy@gentoo) password:
2022-08-14 14:48:11.508+0000: 4163: info : libvirt version: 8.2.0
2022-08-14 14:48:11.508+0000: 4163: info : hostname: gentoo
2022-08-14 14:48:11.508+0000: 4163: error : virPidFileAcquirePath:402 : Failed to acquire pid file '/run/virtlogd.pid': Resource temporarily unavailable
fluffy@gentoo ~ $
that's what it did for mine too
I'm trying tom figure out how logging works here lol
on systemd it would be so easy
the service would just tell us
just journalctl
or the service's status
I think I have to install that
journalctl is systemd
Ohh
https://wiki.gentoo.org/wiki/Sysklogd
maybe adding sysklogd will help?
not sure if you already have a system logger setup
Nope.
what branch are you tracking ~amd64?
Ofc
could you send me /var/log/rc
I don't have that
oh right
edit your /etc/rc.conf
What do I add?
uncomment rc_logger="YES"
idk
i would reboot tho if i were you
Alr lemme finish this episode of rick and morty
first is rc_log_path set
Like this?
rc_log_path="/var/log/rc.log"
nevermind
wiki says
The log will be saved at /var/log/rc.log by default.
https://forums.gentoo.org/viewtopic-t-1103902-start-0.html
they said there is a way to enable logging for just a single service... the example is commented in that /etc/rc.conf supposedly ?
whats the status now
f, not enough info
still crashed?
Yep
@sleek whale could you show me your qemu.conf btw
in /etc/libvirt
stop the service and try starting it with this command /usr/sbin/libvirtd
as root
shawn@gentoo /etc $ sudo /usr/sbin/libvirtd
2022-08-14 16:49:34.062+0000: 16754: info : libvirt version: 8.2.0
2022-08-14 16:49:34.062+0000: 16754: info : hostname: gentoo
2022-08-14 16:49:34.062+0000: 16754: warning : virStorageBackendVolOpen:1656 : ignoring dangling symlink '/home/shawn/.steampath'
it just starts right up for me
maybe that will show why it crashes
Nope
._cfg0000 means you need to run dispatch-conf
--- /etc/libvirt/libvirt.conf 2022-08-12 13:33:43.086642900 -0500
+++ /etc/libvirt/._cfg0000_libvirt.conf 2022-04-01 05:23:38.000000000 -0500
@@ -15,4 +15,4 @@
These can be used in cases when no URI is supplied by the application
(@uri_default also prevents probing of the hypervisor driver).
-uri_default = "qemu:///system"
+#uri_default = "qemu:///system"
(1 of 28) -- /etc/libvirt/libvirt.conf
q quit, h help, n next, e edit-new, z zap-new, u use-new
m merge, t toggle-merge, l look-merge:
gentoo has packages that install those groups, you might need qemu use flag
Is this good or bad?
u
use
all of the libvirt ones, hit 'u' for use
--- /etc/libvirt/libvirtd.conf 2022-08-14 09:42:21.208390293 -0500
+++ /etc/libvirt/._cfg0000_libvirtd.conf 2022-08-14 09:33:11.958410753 -0500
@@ -78,7 +78,7 @@
activation.
This is restricted to 'root' by default.
-unix_sock_group = "libvirt"
+#unix_sock_group = "libvirt"
Set the UNIX socket permissions for the R/O socket. This is used
for monitoring VM status only
@@ -88,7 +88,7 @@
Default allows any user. If setting group ownership, you may want to
restrict this too.
-unix_sock_ro_perms = "0777"
+#unix_sock_ro_perms = "0777"
Set the UNIX socket permissions for the R/W socket. This is used
for full management of VMs
@@ -101,7 +101,7 @@
If not using PolicyKit and setting group ownership for access
control, then you may want to relax this too.
-unix_sock_rw_perms = "0770"
+#unix_sock_rw_perms = "0770"
Set the UNIX socket permissions for the admin interface socket.
@@ -117,7 +117,7 @@
This setting is not required or honoured if using systemd socket
activation.
-unix_sock_dir = "/run/libvirt"
+#unix_sock_dir = "/run/libvirt"
@@ -160,7 +160,7 @@
To restrict monitoring of domains you may wish to either
enable 'sasl' here, or change the polkit policy definition.
-auth_unix_ro = "none"
+#auth_unix_ro = "polkit"
Set an authentication scheme for UNIX read-write sockets.
@@ -176,7 +176,7 @@
is essential to change the systemd SocketMode parameter
back to 0600, to avoid an insecure configuration.
-auth_unix_rw = "polkit"
+#auth_unix_rw = "polkit"
Change the authentication scheme for TCP sockets.
@@ -392,7 +392,7 @@
WARNING: journald is the current output.
WARNING: USE OF THIS IS STRONGLY DISCOURAGED.
-log_level=4
+#log_level = 3
Logging filters:
A filter allows to select a different logging level for a given category
(2 of 28) -- /etc/libvirt/libvirtd.conf
q quit, h help, n next, e edit-new, z zap-new, u use-new
m merge, t toggle-merge, l look-merge:
'u'
--- /etc/libvirt/qemu.conf 2022-08-13 21:34:58.313045399 -0500
+++ /etc/libvirt/._cfg0000_qemu.conf 2022-04-01 05:23:38.000000000 -0500
@@ -516,11 +516,11 @@
user = "+0" # Super user (uid=0)
user = "100" # A user named "100" or a user with uid=100
-user = "fluffy"
+#user = "root"
The group for QEMU processes run by the system instance. It can be
specified in a similar way to user.
-group = "kvm"
+#group = "root"
Whether libvirt should dynamically change file ownership
to match the configured user/group above. Defaults to 1.
(3 of 28) -- /etc/libvirt/qemu.conf
q quit, h help, n next, e edit-new, z zap-new, u use-new
m merge, t toggle-merge, l look-merge:
theyre showing diff in patches
oh i just noticed that group
and user
Still isn't working
f
2022-08-14 15:21:48.063+0000: 4560: info : libvirt version: 8.2.0
2022-08-14 15:21:48.063+0000: 4560: info : hostname: gentoo
2022-08-14 15:21:48.063+0000: 4560: error : virNetworkObjAssignDefLocked:576 : operation failed: network 'default' already exists with uuid 6eec83e2-4dbd-40b5-808e-9afb37239fe5
2022-08-14 15:21:48.126+0000: 4560: error : virGetGroupID:842 : invalid argument: Failed to parse group 'qemu'
2022-08-14 15:21:48.126+0000: 4560: error : virStateInitialize:664 : Initialization of QEMU state driver failed: invalid
argument: Failed to parse group 'qemu'
2022-08-14 15:21:48.126+0000: 4560: error : daemonRunStateInit:604 : Driver state initialization failed
does qemu group and user exist?
hold on a sec
acct-group/qemu-0-r1 pulled in by:
acct-user/qemu-0-r1 requires acct-group/qemu
acct-user/qemu-0-r1 pulled in by:
app-emulation/libvirt-8.2.0 requires acct-user/qemu
[ebuild R ] app-emulation/libvirt-8.2.0:0/8.2.0::gentoo USE="caps libvirtd nls policykit qemu udev virt-network -apparmor -audit -bash-completion -dtrace -firewalld -fuse -glusterfs -iscsi -iscsi-direct -libssh -libssh2 -lvm -lxc -nfs -numa (-openvz) -parted -pcap -rbd -sasl (-selinux) -verify-sig -virtualbox -wireshark-plugins -xen -zfs" 0 KiB
must be qemu flag?
so weird,
very
libvirt hard depends on acct-user/qemu
you should see how many tabs i have opened rn
emerge -1 acct-user/qemu acct-group/qemu
that should add those
but they should have been there already
I installed the acct-group/qemu package
did it work?
Lemme add myself to it
i wasnt in the qemu group but it wont hurt anything to add you
I am in the kvm and libvirt groups for some reason
im only in libvirt group
one thing you can do to reset all config files is use emerge option --oneshot and --noconfmem
--oneshot just allows you to re-emerge dependencies without adding it to your world file , and --noconfmem makes it ignore rules about preserving config files
you will still need to apply them with dispatch-conf afterwards though
wait
was the failed to parse error b4 we changed qemu.conf back or after
this is why I use FEATURES=buildpkg
because if I need to reemerge something without any use flag changes it's already a binary package on my disk
did it work?
still watching rick and morty
oh this might explain why those config files got changed
-Dqemu_user=$(usex caps qemu root)
-Dqemu_group=$(usex caps qemu root)
usex flag [true output] [false output] [true suffix] [false suffix]
if caps is enabled qemu, else root
caps is enabled by default though (IUSE=+caps)
oh no, nevermind you edited that config... fluffy
yeah they edited qemu.conf
fluffy is the name of my car
im still kinda confused tho
cus if that error was b4 we switched back to default
why did it ask for qemu group instead of the group specified in their qemu.conf
Nope
I finished the last episode of season 5
did it work?
Nope
F
I got this error though
error: failed to connect to the hypervisorerror: Operation not supported: Cannot use direct socket mode if no URI is set
try specifying the uri on the config file that i forgot which it was
here
libvirt.conf
also shouldnt it be 2 slashes
nvm it's 3
I might've fixed it
libvirtd [ started ]