From nobody Wed Apr 24 15:39:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1556807428; cv=none; d=zoho.com; s=zohoarc; b=BRSJyYJTevxkQm+3Nh1jb+iZgGalmncjJluoUSA40D9J3yh6QOxud9cnt0jzi1N1NmIw1rrALX8HT3+ID4kLqDU7N08+AazS5mg+CQc2NtzRHfd/8vE+z+V0lFkVW3z9r6qwa4ZjJknLH0CfLFJzIs/+Uu+MdlDrI7tjhHyrTU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556807428; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=LCgnmFcQ6ItLaflWz7DleW32AAA4p1DTLDK3xLeQyTI=; b=Hr1wJs5A2pubMAbbJka+Y0EXPoaKrPlrllxYKogg5u5bbBKerfmAZGPAjMs9pAXgNfqb3AyMXrsn4iJ4zKAPvOPeOqvUxpkC0EWDNZHW6V4gpwwSJcKmHI7wFTjkW/yiCy1t9+cujj9km4LEG8IiLxGf9D336BM16RlF2BRdQMI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1556807428836754.8047618459801; Thu, 2 May 2019 07:30:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F415E883AC; Thu, 2 May 2019 14:30:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 58197827BF; Thu, 2 May 2019 14:30:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5F9FD18089CA; Thu, 2 May 2019 14:30:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x42EU0K7019105 for ; Thu, 2 May 2019 10:30:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4784F7EF51; Thu, 2 May 2019 14:30:00 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 138847EF5C; Thu, 2 May 2019 14:29:53 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 2 May 2019 15:29:51 +0100 Message-Id: <20190502142951.10036-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH] lcitool: use slirp networking if running non-root X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 02 May 2019 14:30:21 +0000 (UTC) The virtual networks are only available to the system libvirt instance. Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 0f60704..9d17f1a 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -511,9 +511,12 @@ class Application: facts["install_disk_size"], facts["install_storage_pool"], ) - network_arg =3D "network=3D{},model=3Dvirtio".format( - facts["install_network"], - ) + if os.geteuid() =3D=3D 0: + network_arg =3D "network=3D{},model=3Dvirtio".format( + facts["install_network"], + ) + else: + network_arg =3D "user,model=3Dvirtio" =20 # Different operating systems require different configuration # files for unattended installation to work, but some operating --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list