From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Nci2OIUX; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 7A40E5A0275 for ; Thu, 25 Sep 2025 11:21:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758792086; h=from:from: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; bh=0XFS2P6cP7PiZG+yHfx/RCfgovy5y1ztwLM3TbLvONQ=; b=Nci2OIUX6TMarZq2hjYMZ/p3UTcp6a10pdLY57mFw9TwJ9rH5C5+I2T/dr7b3hTkxnDpNJ dV+C82L7FIzEVmvbsfzimHtp0FKzfZL/UGWEygn+tE6BxI8y3u6qHNhVkmWbHb0pV8DyiG diZerm+cwpYI2klsBQ2btgrqdSB705E= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-472-5sHA6ZPwMPina79X0fHLHQ-1; Thu, 25 Sep 2025 05:21:19 -0400 X-MC-Unique: 5sHA6ZPwMPina79X0fHLHQ-1 X-Mimecast-MFC-AGG-ID: 5sHA6ZPwMPina79X0fHLHQ_1758792078 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 308A01955D66; Thu, 25 Sep 2025 09:21:18 +0000 (UTC) Received: from localhost (unknown [10.45.224.19]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9BED31955F24; Thu, 25 Sep 2025 09:21:16 +0000 (UTC) Date: Thu, 25 Sep 2025 10:21:15 +0100 From: "Richard W.M. Jones" To: Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= Subject: Re: [PATCH] test: Update README.md Message-ID: <20250925092115.GX1460@redhat.com> References: <20250922220338.49013fce@elisabeth> <20250923123213.61ddd9d5@elisabeth> <20250924104632.75b3f5a8@elisabeth> <20250924085621.GT1460@redhat.com> <20250924110909.43a16cfa@elisabeth> <20250924103131.GU1460@redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: jTW6STl2MlWSynyxn-n4Ewr0dZwZRQFPprO0ANfwZig_1758792078 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 5C7IJN5CDVEWEZAQGWR2HS37NMMXCEVV X-Message-ID-Hash: 5C7IJN5CDVEWEZAQGWR2HS37NMMXCEVV X-MailFrom: rjones@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Stefano Brivio , Yumei Huang , passt-dev@passt.top, david@gibson.dropbear.id.au, crobinso@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, Sep 24, 2025 at 12:00:04PM +0100, Daniel P. Berrang=E9 wrote: > On Wed, Sep 24, 2025 at 11:31:31AM +0100, Richard W.M. Jones wrote: > > On Wed, Sep 24, 2025 at 11:09:09AM +0200, Stefano Brivio wrote: > > > And now that you say that, I just realised that it would be as simple > > > as: > > >=20 > > > https://libguestfs.org/guestfs-faq.1.html#permission-denied-when-ru= nning-libguestfs-as-root > > >=20 > > > LIBGUESTFS_BACKEND=3Ddirect virt-edit... > >=20 > > While that will indeed work, we're trying to discourage people from > > doing that, since it removes the other good things that libvirt does, > > such as setting up SELinux. > >=20 > > The real solution here IMHO is for libvirt to make session mode work > > for root without changing UID. It actually goes out of its way to > > stop this working at the moment[1]. >=20 > We made it possible to run QEMU as root:root while still using > system mode quite a while ago now. It requires adding this > to the XML: >=20 > > > We don't currently use this. I have filed a bug: https://issues.redhat.com/browse/RHEL-117440 > AFAICT, the resulting QEMU will also still have all capabiltiies > set, most importantly CAP_DAC_OVERRIDE. So unless I'm missing > something there shouldn't be anything that can't be done with > system mode, that a session mode would allow. >=20 > I thought I had already suggested that libguestfs use this > seclabel, but don't recall if it was ever tried, or if we > hit some other roadblock. >=20 > > [1] In qemuStateInitialize -> virQEMUDriverConfigNew, I think >=20 > Well that's where the initial control is, but it isn't a simple as just > removing/changing that code. When running as root, we have access to a > lot of system wide resources, and libvirt needs to track which are in > use by VMs or not. We can't do that tracking if we have two separate > privileged daemons for both system mode and a root-session mode. >=20 > It might be possible to have a single daemon service both roles. VMs > defined via a session mode connection would auto-add the above > to default to running as root. It would also need to > dynamically change what's reported in capabilities to reflect this > different default, and more systemd socket unit files at the locations > that the session mode client app looks for. Rich. --=20 Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjon= es Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top