From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YHRyEwXDdGQ1BAAASxT56A (envelope-from ) for ; Mon, 29 May 2023 17:21:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wJ2nEwXDdGR8ZgAA9RJhRA (envelope-from ) for ; Mon, 29 May 2023 17:21:41 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2263132032 for ; Mon, 29 May 2023 17:21:41 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3eg5-0001Wq-Ki; Mon, 29 May 2023 11:20:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3Ugn-0000XN-AH for help-guix@gnu.org; Mon, 29 May 2023 00:41:01 -0400 Received: from netyu.xyz ([152.44.41.246] helo=mail.netyu.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3Ugl-0002b4-F0 for help-guix@gnu.org; Mon, 29 May 2023 00:41:01 -0400 Received: from smtpclient.apple ( [112.97.61.37]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 6cfd5d8a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 29 May 2023 04:40:53 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: Cannot run virt-manager as my user Date: Mon, 29 May 2023 12:40:33 +0800 Message-Id: <87597D5E-2441-4A09-A287-EE7AC11C7DBC@netyu.xyz> References: <87a5xndf9t.fsf@robbyzambito.me> Cc: help-guix@gnu.org In-Reply-To: <87a5xndf9t.fsf@robbyzambito.me> To: Robby Zambito X-Mailer: iPhone Mail (20F66) Received-SPF: pass client-ip=152.44.41.246; envelope-from=ruijie@netyu.xyz; helo=mail.netyu.xyz X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 29 May 2023 11:20:49 -0400 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Ruijie Yu From: Ruijie Yu via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685373701; a=rsa-sha256; cv=none; b=hYGFjzN9D4Vi+wMkojOYyfGZ2TviUJz9k6IErX4+NVONFM/Q7h/icS71ia2k+I219mBMhp YVP69trTACdSz2r7XsFgItKti1dXMa0eVAUiJ27A9Rh4E+miVujnDKMGsZFEIZ/M37LVOB JvBHiO8jpWV7x4GATUWScmPz35ylhUzrD32b8Sx0AwlS6zZ88TolCt+FvzUNeCV8gf2tg2 tD2Eaa1oJa9ui3m8J4nIRY+Dx+Lh8G5nR6xGwz5XTbS7iKR9quwGVjdMNXikbm8kEpzKcx e2WStw5gZ8wcjF0cYrDYsnjcSz+5FT5rqskdL53raXheSjTsZD8I6soqtpIF4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685373701; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zVPritJauhXYB1EdsIAsTajDdSp08Os2U9iuaYuqVeM=; b=H83PmIFrapvQhuRh3VGlYr/SUgFLhPxj1GgZXqE1Ulb+n5ePMpEDun3XGmd8Cvpe7q+fTG aMpUrkiAZzFNp4rFv/Xxf+6mrW/VW5TOMLRmAIlQQ8qsAi1PEvHLKZKEsyopa3/fEDsZkx CvVvx2FuCqsVMb3Z0wIDVgtsTgno6OGkLSgmz9sJzETK4I5CZ4dJZWcIHzT6MhjSXTB8n0 EuvtpHnE1cATko1lhyWq9U5LfB3d5977SuVQ0qMyvqeRuaYopb68OFBaFQgQL02xc4Z89L s8CcIlFNxhtngLTJN7fF3yMf7tQ15XxuhxAh6DTS35aMMHzqCj6WJ+4GexFUGw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.95 X-Spam-Score: -2.95 X-Migadu-Queue-Id: 2263132032 X-TUID: 23Vr7wg4HyMa On May 29, 2023, at 10:49, Robby Zambito wrote: >=20 > =EF=BB=BFHi, >=20 > 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: >=20 > ``` > (service libvirt-service-type) > ``` >=20 > and I've added myself to the libvirt group. >=20 > I can see the service running when I do: >=20 > ``` > 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. > ``` >=20 > I can see the libvirt-sock file that I should be able to use: >=20 > ``` > 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 > ``` >=20 > But I cannot use virt-manager or virsh as my user. I see the following > behavior using virsh: >=20 > ``` > robby@lambda ~$ virsh -c qemu:///system > error: failed to connect to the hypervisor > error: internal error: Unable to get system bus connection: Could not conn= ect: No such file or directory > robby@lambda ~$ sudo virsh -c qemu:///system > Welcome to virsh, the virtualization interactive terminal. >=20 > Type: 'help' for help with commands > 'quit' to quit >=20 > virsh # > ``` >=20 > So I can use virsh while running as root - but I should also be able to > use it when running as my user... >=20 > When I try to connect using virt-manager, I see the following similar erro= r: >=20 > ``` > Unable to connect to libvirt qemu:///system. >=20 > internal error: Unable to get system bus connection: Could not connect: No= such file or directory >=20 > Libvirt URI is: qemu:///system >=20 > Traceback (most recent call last): > File "/gnu/store/sa4wwfmvlrry69gyilhb961gpbbamayf-virt-manager-4.1.0/shar= e/virt-manager/virtManager/connection.py", line 923, in _do_open > self._backend.open(cb, data) > File "/gnu/store/sa4wwfmvlrry69gyilhb961gpbbamayf-virt-manager-4.1.0/shar= e/virt-manager/virtinst/connection.py", line 171, in open > conn =3D libvirt.openAuth(self._open_uri, > File "/gnu/store/nb6yaafwa44jqfg9s5fbr5nbsa46panm-python-libvirt-8.6.0/li= b/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 > ``` >=20 > Since this seems to be an issue relating to dbus, here are the following > services I have running related to that: >=20 > At a system level: > ``` > (service dbus-root-service-type) > (service elogind-service-type) > ``` >=20 > As my user: > ``` > (service home-dbus-service-type) > ``` >=20 > Maybe there is some conflict between running dbus as my user and as > root? >=20 > Any advice for getting virt-manager working would be greatly > appreciated! >=20 > Thanks, > Robby >=20 Does it work on a new tty, or if you explicitly run `sg libvirt =E2=80=A6`? = If so, the only thing you need is a new terminal window with you on the lib= virt group. If that doesn=E2=80=99t work, try rebooting as well.=20=