* Cannot run virt-manager as my user @ 2023-05-29 2:35 Robby Zambito 2023-05-29 4:40 ` Ruijie Yu via 0 siblings, 1 reply; 5+ messages in thread From: Robby Zambito @ 2023-05-29 2:35 UTC (permalink / raw) To: help-guix Hi, I am trying to set up virt-manager on my system in order to set up some virtual machines. I added the libvirtd service to my system by adding the following service to my system configuration: ``` (service libvirt-service-type) ``` and I've added myself to the libvirt group. I can see the service running when I do: ``` robby@lambda ~$ sudo herd status libvirtd Status of libvirtd: It is running since 10:34:29 PM (5 minutes ago). Running value is 256. It is enabled. Provides (libvirtd). Requires (). Will be respawned. ``` I can see the libvirt-sock file that I should be able to use: ``` robby@lambda ~$ groups users libvirt netdev audio video dialout wheel robby@lambda ~$ ll /var/run/libvirt/libvirt-sock srwxrwx--- 1 root libvirt 0 May 28 22:34 /var/run/libvirt/libvirt-sock ``` But I cannot use virt-manager or virsh as my user. I see the following behavior using virsh: ``` robby@lambda ~$ virsh -c qemu:///system error: failed to connect to the hypervisor error: internal error: Unable to get system bus connection: Could not connect: No such file or directory robby@lambda ~$ sudo virsh -c qemu:///system Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # ``` So I can use virsh while running as root - but I should also be able to use it when running as my user... When I try to connect using virt-manager, I see the following similar error: ``` Unable to connect to libvirt qemu:///system. internal error: Unable to get system bus connection: Could not connect: No such file or directory Libvirt URI is: qemu:///system Traceback (most recent call last): File "/gnu/store/sa4wwfmvlrry69gyilhb961gpbbamayf-virt-manager-4.1.0/share/virt-manager/virtManager/connection.py", line 923, in _do_open self._backend.open(cb, data) File "/gnu/store/sa4wwfmvlrry69gyilhb961gpbbamayf-virt-manager-4.1.0/share/virt-manager/virtinst/connection.py", line 171, in open conn = libvirt.openAuth(self._open_uri, File "/gnu/store/nb6yaafwa44jqfg9s5fbr5nbsa46panm-python-libvirt-8.6.0/lib/python3.10/site-packages/libvirt.py", line 147, in openAuth raise libvirtError('virConnectOpenAuth() failed') libvirt.libvirtError: internal error: Unable to get system bus connection: Could not connect: No such file or directory ``` Since this seems to be an issue relating to dbus, here are the following services I have running related to that: At a system level: ``` (service dbus-root-service-type) (service elogind-service-type) ``` As my user: ``` (service home-dbus-service-type) ``` Maybe there is some conflict between running dbus as my user and as root? Any advice for getting virt-manager working would be greatly appreciated! Thanks, Robby ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cannot run virt-manager as my user 2023-05-29 2:35 Cannot run virt-manager as my user Robby Zambito @ 2023-05-29 4:40 ` Ruijie Yu via 2023-05-29 13:14 ` Robby Zambito 0 siblings, 1 reply; 5+ messages in thread From: Ruijie Yu via @ 2023-05-29 4:40 UTC (permalink / raw) To: Robby Zambito; +Cc: help-guix On May 29, 2023, at 10:49, Robby Zambito <contact@robbyzambito.me> wrote: > > Hi, > > I am trying to set up virt-manager on my system in order to set up some > virtual machines. I added the libvirtd service to my system by adding > the following service to my system configuration: > > ``` > (service libvirt-service-type) > ``` > > and I've added myself to the libvirt group. > > I can see the service running when I do: > > ``` > robby@lambda ~$ sudo herd status libvirtd > Status of libvirtd: > It is running since 10:34:29 PM (5 minutes ago). > Running value is 256. > It is enabled. > Provides (libvirtd). > Requires (). > Will be respawned. > ``` > > I can see the libvirt-sock file that I should be able to use: > > ``` > robby@lambda ~$ groups > users libvirt netdev audio video dialout wheel > robby@lambda ~$ ll /var/run/libvirt/libvirt-sock > srwxrwx--- 1 root libvirt 0 May 28 22:34 /var/run/libvirt/libvirt-sock > ``` > > But I cannot use virt-manager or virsh as my user. I see the following > behavior using virsh: > > ``` > robby@lambda ~$ virsh -c qemu:///system > error: failed to connect to the hypervisor > error: internal error: Unable to get system bus connection: Could not connect: No such file or directory > robby@lambda ~$ sudo virsh -c qemu:///system > Welcome to virsh, the virtualization interactive terminal. > > Type: 'help' for help with commands > 'quit' to quit > > virsh # > ``` > > So I can use virsh while running as root - but I should also be able to > use it when running as my user... > > When I try to connect using virt-manager, I see the following similar error: > > ``` > Unable to connect to libvirt qemu:///system. > > internal error: Unable to get system bus connection: Could not connect: No such file or directory > > Libvirt URI is: qemu:///system > > Traceback (most recent call last): > File "/gnu/store/sa4wwfmvlrry69gyilhb961gpbbamayf-virt-manager-4.1.0/share/virt-manager/virtManager/connection.py", line 923, in _do_open > self._backend.open(cb, data) > File "/gnu/store/sa4wwfmvlrry69gyilhb961gpbbamayf-virt-manager-4.1.0/share/virt-manager/virtinst/connection.py", line 171, in open > conn = libvirt.openAuth(self._open_uri, > File "/gnu/store/nb6yaafwa44jqfg9s5fbr5nbsa46panm-python-libvirt-8.6.0/lib/python3.10/site-packages/libvirt.py", line 147, in openAuth > raise libvirtError('virConnectOpenAuth() failed') > libvirt.libvirtError: internal error: Unable to get system bus > connection: Could not connect: No such file or directory > ``` > > Since this seems to be an issue relating to dbus, here are the following > services I have running related to that: > > At a system level: > ``` > (service dbus-root-service-type) > (service elogind-service-type) > ``` > > As my user: > ``` > (service home-dbus-service-type) > ``` > > Maybe there is some conflict between running dbus as my user and as > root? > > Any advice for getting virt-manager working would be greatly > appreciated! > > Thanks, > Robby > Does it work on a new tty, or if you explicitly run `sg libvirt …`? If so, the only thing you need is a new terminal window with you on the libvirt group. If that doesn’t work, try rebooting as well. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cannot run virt-manager as my user 2023-05-29 4:40 ` Ruijie Yu via @ 2023-05-29 13:14 ` Robby Zambito 2023-05-29 15:01 ` David Conner 0 siblings, 1 reply; 5+ messages in thread From: Robby Zambito @ 2023-05-29 13:14 UTC (permalink / raw) To: Ruijie Yu; +Cc: help-guix Hi, Ruijie Yu <ruijie@netyu.xyz> writes: > Does it work on a new tty, or if you explicitly run `sg libvirt …`? If > so, the only thing you need is a new terminal window with you on the > libvirt group. If that doesn’t work, try rebooting as well. I had rebooted several times before writing this email, however I just tried `sg libvirt virsh` as my user and that worked... so I tried just running `virsh` and that also worked. I still run into the same error when running either `virt-manager` or `sg libvirt virt-manager` from the terminal though. Thanks Robby ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cannot run virt-manager as my user 2023-05-29 13:14 ` Robby Zambito @ 2023-05-29 15:01 ` David Conner 2023-05-29 17:06 ` Robby Zambito 0 siblings, 1 reply; 5+ messages in thread From: David Conner @ 2023-05-29 15:01 UTC (permalink / raw) To: Robby Zambito; +Cc: Ruijie Yu, help-guix [-- Attachment #1: Type: text/plain, Size: 799 bytes --] I have a similar libvirtd service configuration on my system, but I've only used libvirt a handful of times. Do you want access to the user's libvert socket? If you run =libvirtd --help= this tells you where the user session socket will be set up. I tried using =virsh -c qemu:///session= I couldn't find the libvirt D-BUS API bindings described here: https://libvirt.org/dbus.html and I believe these are required above the group membership/setup for permitting the user access to the qemu://system sockets. I never could get the user-level connection work in the past. However, when I go to start virt-manager, i'm getting a GLIBC mismatch. =virt-manager -c qemu:///session= crashes on startup while the virsh console is running. I think I need to update my user's profile. -- David Conner [-- Attachment #2: virt-manager startup log --] [-- Type: text/plain, Size: 4690 bytes --] [Mon, 29 May 2023 10:38:36 virt-manager 12143] DEBUG (cli:204) Version 4.1.0 launched with command line: /gnu/store/k1xilizwwbpwz302v59f9jjfkk48sp3x-virt-manager-4.1.0/bin/.virt-manager-real --debug -c qemu:///session [Mon, 29 May 2023 10:38:36 virt-manager 12143] DEBUG (virtmanager:167) virt-manager version: 4.1.0 [Mon, 29 May 2023 10:38:36 virt-manager 12143] DEBUG (virtmanager:168) virtManager import: /gnu/store/k1xilizwwbpwz302v59f9jjfkk48sp3x-virt-manager-4.1.0/share/virt-manager/virtManager [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (virtmanager:205) PyGObject version: 3.40.1 [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (virtmanager:209) GTK version: 3.24.30 [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (systray:476) Showing systray: False [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (inspection:206) python guestfs is not installed [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (engine:111) No stored URIs found. [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (engine:461) processing cli command uri=qemu:///session show_window=manager domain= [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:482) conn=qemu:///session changed to state=Connecting [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:903) Scheduling background open thread for qemu:///session (.virt-manager-real:12143): dconf-WARNING **: 10:38:37.091: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (engine:211) Initial gtkapplication activated [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:128) libvirt URI versions library=8.6.0 driver=8.6.0 hypervisor=7.2.1 [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:109) Fetched capabilities for qemu:///session: <capabilities> ... </capabilities> [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:739) Using domain events [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:778) Using network events [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:797) Using storage pool events [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:822) Using node device events [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:691) storage pool refresh event: pool=default [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:1072) pool=default status=Active added [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (storage:137) Found default pool name=default target=/home/dc/.local/share/libvirt/images [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (connection:482) conn=qemu:///session changed to state=Active [Mon, 29 May 2023 10:38:37 virt-manager 12143] DEBUG (engine:428) Launching requested window 'manager' (.virt-manager-real:12143): dconf-WARNING **: 10:38:37.270: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files (.virt-manager-real:12143): dconf-WARNING **: 10:38:37.272: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files (.virt-manager-real:12143): Gtk-WARNING **: 10:38:37.307: Could not load a pixbuf from icon theme. This may indicate that pixbuf loaders or the mime database could not be found. ** Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /home/dc/.guix-extra-profiles/desktop/desktop/share/icons/Papirus-Dark/24x24/status/image-missing.svg: Unable to load image-loading module: /gnu/store/bb8ijpv1y3wpppfqd7r0pkk25xckag19-librsvg-2.54.5/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6: version `GLIBC_2.34' not found (required by /gnu/store/bb8ijpv1y3wpppfqd7r0pkk25xckag19-librsvg-2.54.5/lib/librsvg-2.so.2) (gdk-pixbuf-error-quark, 5) Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /home/dc/.guix-extra-profiles/desktop/desktop/share/icons/Papirus-Dark/24x24/status/image-missing.svg: Unable to load image-loading module: /gnu/store/bb8ijpv1y3wpppfqd7r0pkk25xckag19-librsvg-2.54.5/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6: version `GLIBC_2.34' not found (required by /gnu/store/bb8ijpv1y3wpppfqd7r0pkk25xckag19-librsvg-2.54.5/lib/librsvg-2.so.2) (gdk-pixbuf-error-quark, 5) Aborted ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cannot run virt-manager as my user 2023-05-29 15:01 ` David Conner @ 2023-05-29 17:06 ` Robby Zambito 0 siblings, 0 replies; 5+ messages in thread From: Robby Zambito @ 2023-05-29 17:06 UTC (permalink / raw) To: David Conner; +Cc: Ruijie Yu, help-guix David Conner <aionfork@gmail.com> writes: > I have a similar libvirtd service configuration on my system, but I've > only used libvirt a handful of times. Do you want access to the user's > libvert socket? I have no strong preference towards using a user-specific libvirt socket versus the system libvirt socket, as I'm running this on my single user system. > If you run =libvirtd --help= this tells you where the user session > socket will be set up. > > I tried using =virsh -c qemu:///session= This worked the same as `virsh -c qemu:///system` for me (as which one doesn't really matter to me), and it gave me the idea to try using /session in virt-manager instead. In virt-manager I went to File > Add Connection..., set the hypervisor to Custom URI... and set the URI to qemu:///session like you said. This worked! I'm not sure why I can't use the system one, but this is good enough for me :). I'm also not actually sure why this works, since I don't have the socket file shown by `libvirtd --help`... Oh well :D good enough for me! Thanks, Robby ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-29 20:06 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-05-29 2:35 Cannot run virt-manager as my user Robby Zambito 2023-05-29 4:40 ` Ruijie Yu via 2023-05-29 13:14 ` Robby Zambito 2023-05-29 15:01 ` David Conner 2023-05-29 17:06 ` Robby Zambito
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.