From unknown Sun Aug 17 22:05:28 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38513] [PATCH] gnu: Remove uses of deprecated Qemu "-nic, model=foo" invokations. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 06 Dec 2019 21:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38513 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38513@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15756667954588 (code B ref -1); Fri, 06 Dec 2019 21:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Dec 2019 21:13:15 +0000 Received: from localhost ([127.0.0.1]:47112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idKuZ-0001Bw-5P for submit@debbugs.gnu.org; Fri, 06 Dec 2019 16:13:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:39642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idKuX-0001Bo-3O for submit@debbugs.gnu.org; Fri, 06 Dec 2019 16:13:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54347) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idKuV-0004eC-Ky for guix-patches@gnu.org; Fri, 06 Dec 2019 16:13:12 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idKuU-0003R2-7e for guix-patches@gnu.org; Fri, 06 Dec 2019 16:13:11 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56035) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1idKuT-0003FB-Oh for guix-patches@gnu.org; Fri, 06 Dec 2019 16:13:10 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3481822860 for ; Fri, 6 Dec 2019 16:13:07 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 06 Dec 2019 16:13:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=1Da1B1N4rq77gPfHBdye/pMvX5 9cTL4/qnOhPF+iBRk=; b=V3OHaU9QdOnJunxqNw+4NbraytrdX0KLi/OiaV8qwR ALYe+Gth859sJEHr2156/wHKaWIdGDI4SH1yvUjP4XpmKkYdtgM7VMy+lfASE/ZD XEkv4bNul9g5xDv4I2MGgxSHpyq5DoLldZyGkZYnRXQZlqeRaPt5T+kcGB5Nsjmw hMfKgf1Lankx03VxL68r5A7WflfU30743TxDnDrqVDU0ISyqoeB6SnCYGsqmrp7y muPuhg2qqwEiaXX8B4Pr/vYHf9PfmUiCm015b5SMmSP4RMyRsmTKwA8bT1JI9f7f FzspW7YzaMCE8G83+AOft9ALpmqLpOQhcLKLa8QTEeHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=1Da1B1N4rq77gPfHB dye/pMvX59cTL4/qnOhPF+iBRk=; b=fXwRitG6bsBt04uIDnlJ+649k9eOaHrg1 ZbaIRtqKeC3J4J3ulH8XQ0Xj008Q4XE5vlVNwi0p9/+lgvXXRhheFhUpziRe+h3T wPJmI5y7Vwb8j+L9OKFP0iWUkI8IYuRlFXn/bSA2Z5DVdCVYs5I9iAhtDZTWxNi0 TP0bb9kdagsAJO/VOZd1mS0bqmKu+jZa9oUQT88OfydHYptH5AIsqxdxPOB7Lu0/ oDLFw2d7C33yCYBbLUrcffpMi0yLrMg6duK7plWmTbVHXaen5MsiM1qZEC+GMZrV vMMw7LbsshG8/PltVp/BO4Oo0/eawxJOKq6KJmOE/2iMG6aGAnMkg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudekfedgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeforghrihhushcuuegrkhhkvgcuoehmsggrkhhkvgesfhgrshht mhgrihhlrdgtohhmqeenucfkphepiedvrdduiedrudelvddrudehtdenucfrrghrrghmpe hmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomhenucevlhhushht vghrufhiiigvpedt X-ME-Proxy: Received: from localhost (ti0006q161-0149.bb.online.no [62.16.192.150]) by mail.messagingengine.com (Postfix) with ESMTPA id B6DA530600AB for ; Fri, 6 Dec 2019 16:13:06 -0500 (EST) From: Marius Bakke Date: Fri, 6 Dec 2019 22:13:04 +0100 Message-Id: <20191206211304.2724-1-mbakke@fastmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.27 X-Spam-Score: 0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) * gnu/build/vm.scm (load-in-linux-vm): Move Qemu network configuration from ARCH-SPECIFIC-FLAGS to the Qemu command line. Use the "-nic" option of Qemu instead of "-device" and "-net". * gnu/system/vm.scm (common-qemu-options): Change "-net nic ..." to "-nic user ...". * doc/guix.texi (Installing Guix in a VM, Running Guix in a VM): Adjust examples accordingly. --- doc/guix.texi | 16 +++++++--------- gnu/build/vm.scm | 10 ++-------- gnu/system/vm.scm | 2 +- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7d50f31d20..31f26694fd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46,7 +46,7 @@ Copyright @copyright{} 2017, 2018 Carlo Zancanaro@* Copyright @copyright{} 2017 Thomas Danckaert@* Copyright @copyright{} 2017 humanitiesNerd@* Copyright @copyright{} 2017 Christopher Allan Webber@* -Copyright @copyright{} 2017, 2018 Marius Bakke@* +Copyright @copyright{} 2017, 2018, 2019 Marius Bakke@* Copyright @copyright{} 2017, 2019 Hartmut Goebel@* Copyright @copyright{} 2017, 2019 Maxim Cournoyer@* Copyright @copyright{} 2017, 2018, 2019 Tobias Geerinckx-Rice@* @@ -2472,7 +2472,7 @@ Boot the USB installation image in an VM: @example qemu-system-x86_64 -m 1024 -smp 1 -enable-kvm \ - -net user -net nic,model=virtio -boot menu=on,order=d \ + -nic user,model=virtio-net-pci -boot menu=on,order=d \ -drive file=guix-system.img \ -drive media=cdrom,file=guix-system-install-@value{VERSION}.@var{system}.iso @end example @@ -26514,7 +26514,7 @@ vm-image} on x86_64 hardware: @example $ qemu-system-x86_64 \ - -net user -net nic,model=virtio \ + -nic user,model=virtio-net-pci \ -enable-kvm -m 1024 \ -device virtio-blk,drive=myhd \ -drive if=none,file=/tmp/qemu-image,id=myhd @@ -26527,14 +26527,12 @@ Here is what each of these options means: This specifies the hardware platform to emulate. This should match the host. -@item -net user +@item -nic user,model=virtio-net-pci Enable the unprivileged user-mode network stack. The guest OS can access the host but not vice versa. This is the simplest way to get the -guest OS online. - -@item -net nic,model=virtio -You must create a network interface of a given model. If you do not -create a NIC, the boot will fail. Assuming your hardware platform is +guest OS online. @code{model} specifies which network device to emulate: +@code{virtio-net-pci} is a special device made for virtualized operating +systems and recommended for most uses. Assuming your hardware platform is x86_64, you can get a list of available NIC models by running @command{qemu-system-x86_64 -net nic,model=help}. diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 89d685b352..9a9e5bd001 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -131,14 +131,7 @@ the #:references-graphs parameter of 'derivation'." ;; The serial port name differs between emulated ;; architectures/machines. " console=" - (if target-arm? "ttyAMA0" "ttyS0")) - - ;; NIC is not supported on ARM "virt" machine, so use a user mode - ;; network stack instead. - ,@(if target-arm? - '("-device" "virtio-net-pci,netdev=mynet" - "-netdev" "user,id=mynet") - '("-net" "nic,model=virtio")))) + (if target-arm? "ttyAMA0" "ttyS0")))) (when make-disk-image? (format #t "creating ~a image of ~,2f MiB...~%" @@ -163,6 +156,7 @@ the #:references-graphs parameter of 'derivation'." ;; CPU with the maximum possible feature set otherwise. "-cpu" "max" "-m" (number->string memory-size) + "-nic" "user,model=virtio-net-pci" "-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng" "-device" "virtio-rng-pci,rng=guixsd-vm-rng" "-virtfs" diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 8609bd2ace..5ee9855ae5 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -927,7 +927,7 @@ with '-virtfs' options for the host file systems listed in SHARED-FS." '()) "-no-reboot" - "-net nic,model=virtio" + "-nic" "user,model=virtio-net-pci" "-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng" "-device" "virtio-rng-pci,rng=guixsd-vm-rng" -- 2.24.0 From unknown Sun Aug 17 22:05:28 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38513] [PATCH] gnu: Remove uses of deprecated Qemu "-nic, model=foo" invokations. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Dec 2019 02:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38513 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marius Bakke Cc: 38513@debbugs.gnu.org Received: via spool by 38513-submit@debbugs.gnu.org id=B38513.157577227718917 (code B ref 38513); Sun, 08 Dec 2019 02:32:02 +0000 Received: (at 38513) by debbugs.gnu.org; 8 Dec 2019 02:31:17 +0000 Received: from localhost ([127.0.0.1]:49971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idmLs-0004uh-Jk for submit@debbugs.gnu.org; Sat, 07 Dec 2019 21:31:16 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:35873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idmLq-0004ot-BG for 38513@debbugs.gnu.org; Sat, 07 Dec 2019 21:31:14 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4881522846; Sat, 7 Dec 2019 12:52:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 07 Dec 2019 12:52:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=aP8FhkbsJL7wND4h0Q2uclA5 sOZnS20s6tdjQNCsZ8Y=; b=azgBHd9E/lmHx/Jpi8fsClIp9B6v0rNGJpm5PVKH 0t5Ssh255N7iAUTuHQEc5Hnu5SmKjldwwby1Q0vQhMqmEy4qoIBColJ7AqQMNZ9j loFsm93pyyc1eyZBMf0+JO+WDTB67s8EsmHXM2CLvhkO8QKFlHjU7Fb4fxmF9S2C TLY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=aP8Fhk bsJL7wND4h0Q2uclA5sOZnS20s6tdjQNCsZ8Y=; b=L0ElpZUzxIJgagwwTdWgDP R2vq7SrqFGQeCshOsHfRX8cNxdHb7REINkfFF8fQSTLzjzASZz/U1cttpXfn6gP4 3IHWIqFBHuXXnkDJs1mt1SIzAYwtCN4cK1D9CN2oXULOQmfiqG9AfZpRmMfknjh7 zLWIwuRNe4lOFCHxC9GB3jDQ+1ungWI5wG4p5Md4r1XOsUPnupeL5nX9JMgcpnEi m7GSXSqSGskLcI89P+zSrFR9SNv4VrguRMTo6CF0oTZ4WJCqnyvzuchXPKU90GxU 4qiVJCqcY3vuGwiGyVnpPuH7GXuIHk8xZufewhePMPsZzqBnial4t/oxGHEsxkSQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudekhedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujggfsehttdertddtredvnecuhfhrohhmpefnvgho ucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghrihdrnhgrmhgvqeenucfkphepje durddvfedtrdduudeirddukeeknecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehf rghmuhhlrghrihdrnhgrmhgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (c-71-230-116-188.hsd1.pa.comcast.net [71.230.116.188]) by mail.messagingengine.com (Postfix) with ESMTPA id F369630604C5; Sat, 7 Dec 2019 12:52:51 -0500 (EST) Date: Sat, 7 Dec 2019 12:52:40 -0500 From: Leo Famulari Message-ID: <20191207175240.GA8154@jasmine.lan> References: <20191206211304.2724-1-mbakke@fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191206211304.2724-1-mbakke@fastmail.com> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Nit-pck: It should be "invocation". From unknown Sun Aug 17 22:05:28 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38513] [PATCH] gnu: Remove uses of deprecated Qemu "-nic, model=foo" invokations. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 14 Dec 2019 23:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38513 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marius Bakke Cc: 38513@debbugs.gnu.org Received: via spool by 38513-submit@debbugs.gnu.org id=B38513.157636624128352 (code B ref 38513); Sat, 14 Dec 2019 23:31:01 +0000 Received: (at 38513) by debbugs.gnu.org; 14 Dec 2019 23:30:41 +0000 Received: from localhost ([127.0.0.1]:35868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igGrw-0007NE-Mu for submit@debbugs.gnu.org; Sat, 14 Dec 2019 18:30:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igGru-0007My-Bu for 38513@debbugs.gnu.org; Sat, 14 Dec 2019 18:30:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1igGrp-0003oq-6Y; Sat, 14 Dec 2019 18:30:33 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43822 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1igGra-0003UF-Ey; Sat, 14 Dec 2019 18:30:30 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20191206211304.2724-1-mbakke@fastmail.com> Date: Sun, 15 Dec 2019 00:30:16 +0100 In-Reply-To: <20191206211304.2724-1-mbakke@fastmail.com> (Marius Bakke's message of "Fri, 6 Dec 2019 22:13:04 +0100") Message-ID: <87fthmwkmv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Marius Bakke skribis: > * gnu/build/vm.scm (load-in-linux-vm): Move Qemu network configuration fr= om > ARCH-SPECIFIC-FLAGS to the Qemu command line. Use the "-nic" option of Q= emu > instead of "-device" and "-net". > * gnu/system/vm.scm (common-qemu-options): Change "-net nic ..." to "-nic= user ...". > * doc/guix.texi (Installing Guix in a VM, Running Guix in a VM): Adjust > examples accordingly. Apart from the typo Leo noted, it LGTM! :-) Thanks, Ludo=E2=80=99. From unknown Sun Aug 17 22:05:28 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Marius Bakke Subject: bug#38513: closed (Re: [bug#38513] [PATCH] gnu: Remove uses of deprecated Qemu "-nic, model=foo" invokations.) Message-ID: References: <87h81xcp93.fsf@devup.no> <20191206211304.2724-1-mbakke@fastmail.com> X-Gnu-PR-Message: they-closed 38513 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 38513@debbugs.gnu.org Date: Wed, 18 Dec 2019 21:13:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1576703582-10527-1" This is a multi-part message in MIME format... ------------=_1576703582-10527-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #38513: [PATCH] gnu: Remove uses of deprecated Qemu "-nic, model=3Dfoo" inv= okations. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 38513@debbugs.gnu.org. --=20 38513: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D38513 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1576703582-10527-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 38513-done) by debbugs.gnu.org; 18 Dec 2019 21:12:17 +0000 Received: from localhost ([127.0.0.1]:44019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihgcD-0002is-8K for submit@debbugs.gnu.org; Wed, 18 Dec 2019 16:12:17 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:52213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihgcB-0002ig-SV for 38513-done@debbugs.gnu.org; Wed, 18 Dec 2019 16:12:16 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B178120931; Wed, 18 Dec 2019 16:12:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 18 Dec 2019 16:12:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=F6BDd/UyThJftGbReA9ZYE1WlW j4H/WmBjY8yARCFIA=; b=TPMdE9hVHSsJ5a+hsK0EzCOtQ/Jfh/56l7r4AAkn6c CRsM5cQEcPQa0AKP5/nLMSFhqqlGaRfdlz+gFgoJpXXOoAmdgFlml13DeGNgXInv YOxiDrZZKB8eEgY/nyfBMF+rEmezfxf4JPip8+gPb7NqoHxPfrB2TxQuOOBEjR/w YucmZbohyTCG1PdSz4EoOX/Z1StZ5k11ublbegNjEG1DdTJu5USHNxnm/4OxwqgO SbRXmYK6YGCMR/kV/JhVGYFwsZja1L5z5CE5XJ+cyklBGAWfaIsxajVtMZOxvr1Q 4OXMsmTksKB0Gwoms0ezCH0mgHOVwhnCNBr8sU/01mLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=F6BDd/ UyThJftGbReA9ZYE1WlWj4H/WmBjY8yARCFIA=; b=ni9wlX8/a6qch/p/WhtQjB 24AJoYcMtH5++kubEq2Ruz+V7fC6L0wbECw+QKs62mOhHiI3P41Y2ahCvVrQJW+c l/jfNtBo2dcxq22a6UlfDxpsV5KllxUQ3jSfa3pvJrBLwv3wlyR9cmiWehln1mZX S/l1PhAGRwLcSX9iO7jHZFglRcc1Qx0n9d2hyax2JHZGB4DZ6iUk5hbc+QdWIoor rwBk6YwEBNE7/qle3loeCFvK87yxGSfchHumxtTo0k22aQOfWmuAe/ImSWERpMwh K0CfxR/tf8VBBjY5QRsm6vPdV+F6tyaj6JZv+G8q8C6lVX5KcQNiSf/Xehh/8mbw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddtledgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesghdtreertderjeenucfhrhhomhepofgrrhhi uhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghsthhmrghilhdrtghomheqnecukfhppe ekgedrvddtvddrieelrddvheefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsggrkhhk vgesfhgrshhtmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (ti0006q161-3035.bb.online.no [84.202.69.253]) by mail.messagingengine.com (Postfix) with ESMTPA id 4662B30607CD; Wed, 18 Dec 2019 16:12:10 -0500 (EST) From: Marius Bakke To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#38513] [PATCH] gnu: Remove uses of deprecated Qemu "-nic, model=foo" invokations. In-Reply-To: <87fthmwkmv.fsf@gnu.org> References: <20191206211304.2724-1-mbakke@fastmail.com> <87fthmwkmv.fsf@gnu.org> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Wed, 18 Dec 2019 22:12:08 +0100 Message-ID: <87h81xcp93.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 38513-done Cc: 38513-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi! > > Marius Bakke skribis: > >> * gnu/build/vm.scm (load-in-linux-vm): Move Qemu network configuration f= rom >> ARCH-SPECIFIC-FLAGS to the Qemu command line. Use the "-nic" option of = Qemu >> instead of "-device" and "-net". >> * gnu/system/vm.scm (common-qemu-options): Change "-net nic ..." to "-ni= c user ...". >> * doc/guix.texi (Installing Guix in a VM, Running Guix in a VM): Adjust >> examples accordingly. > > Apart from the typo Leo noted, it LGTM! :-) I discovered a problem with our documentation when researching this patch. Qemu nowadays, with no "-nic" or related arguments, acts the same as "-nic,model=3De1000e". So a full network is available by default, unless one adds "-nic none". The "Running Guix in a VM" section of the manual mentions Qemu networking twice, and both are inaccurate or wrong. It would be good to reword that section. Any takers? :-) In any case this patch will be pushed shortly. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEyBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl36ligACgkQoqBt8qM6 VPrmJAf1EMRULM6b/0BotAJ3xFCDGlZGNknMeiMab5xJfXjo9bJumu2kn25wnLcT czcyxkabTYzEtyKLq7xFHMZQYPBi2R1S4KUG/GAgulsRvnC9g+qEF5s0gqEmsXBk M2QmELGNCqjd27vzSil2F6xtstnxxpEpotQtDESzAVB2C4c8cBOBXmDGF159vECa p80qOJRSTZkBQjufgWwEgqvZ2mFmahqTYmRXKahwbYYmgGpqJ3hpqXMBl4dKWpkb rgnJr5256NNPScABINvIMP1LLWHkBmtjcYfry9pG3+wX+g0ybVRQogU0mVVRGjrO HgP4JygJ779JWyCT8q2M9VbTzJXz =Rvv8 -----END PGP SIGNATURE----- --=-=-=-- ------------=_1576703582-10527-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Dec 2019 21:13:15 +0000 Received: from localhost ([127.0.0.1]:47112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idKuZ-0001Bw-5P for submit@debbugs.gnu.org; Fri, 06 Dec 2019 16:13:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:39642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idKuX-0001Bo-3O for submit@debbugs.gnu.org; Fri, 06 Dec 2019 16:13:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54347) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idKuV-0004eC-Ky for guix-patches@gnu.org; Fri, 06 Dec 2019 16:13:12 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idKuU-0003R2-7e for guix-patches@gnu.org; Fri, 06 Dec 2019 16:13:11 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56035) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1idKuT-0003FB-Oh for guix-patches@gnu.org; Fri, 06 Dec 2019 16:13:10 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3481822860 for ; Fri, 6 Dec 2019 16:13:07 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 06 Dec 2019 16:13:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=1Da1B1N4rq77gPfHBdye/pMvX5 9cTL4/qnOhPF+iBRk=; b=V3OHaU9QdOnJunxqNw+4NbraytrdX0KLi/OiaV8qwR ALYe+Gth859sJEHr2156/wHKaWIdGDI4SH1yvUjP4XpmKkYdtgM7VMy+lfASE/ZD XEkv4bNul9g5xDv4I2MGgxSHpyq5DoLldZyGkZYnRXQZlqeRaPt5T+kcGB5Nsjmw hMfKgf1Lankx03VxL68r5A7WflfU30743TxDnDrqVDU0ISyqoeB6SnCYGsqmrp7y muPuhg2qqwEiaXX8B4Pr/vYHf9PfmUiCm015b5SMmSP4RMyRsmTKwA8bT1JI9f7f FzspW7YzaMCE8G83+AOft9ALpmqLpOQhcLKLa8QTEeHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=1Da1B1N4rq77gPfHB dye/pMvX59cTL4/qnOhPF+iBRk=; b=fXwRitG6bsBt04uIDnlJ+649k9eOaHrg1 ZbaIRtqKeC3J4J3ulH8XQ0Xj008Q4XE5vlVNwi0p9/+lgvXXRhheFhUpziRe+h3T wPJmI5y7Vwb8j+L9OKFP0iWUkI8IYuRlFXn/bSA2Z5DVdCVYs5I9iAhtDZTWxNi0 TP0bb9kdagsAJO/VOZd1mS0bqmKu+jZa9oUQT88OfydHYptH5AIsqxdxPOB7Lu0/ oDLFw2d7C33yCYBbLUrcffpMi0yLrMg6duK7plWmTbVHXaen5MsiM1qZEC+GMZrV vMMw7LbsshG8/PltVp/BO4Oo0/eawxJOKq6KJmOE/2iMG6aGAnMkg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudekfedgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeforghrihhushcuuegrkhhkvgcuoehmsggrkhhkvgesfhgrshht mhgrihhlrdgtohhmqeenucfkphepiedvrdduiedrudelvddrudehtdenucfrrghrrghmpe hmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomhenucevlhhushht vghrufhiiigvpedt X-ME-Proxy: Received: from localhost (ti0006q161-0149.bb.online.no [62.16.192.150]) by mail.messagingengine.com (Postfix) with ESMTPA id B6DA530600AB for ; Fri, 6 Dec 2019 16:13:06 -0500 (EST) From: Marius Bakke To: guix-patches@gnu.org Subject: [PATCH] gnu: Remove uses of deprecated Qemu "-nic, model=foo" invokations. Date: Fri, 6 Dec 2019 22:13:04 +0100 Message-Id: <20191206211304.2724-1-mbakke@fastmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.27 X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) * gnu/build/vm.scm (load-in-linux-vm): Move Qemu network configuration from ARCH-SPECIFIC-FLAGS to the Qemu command line. Use the "-nic" option of Qemu instead of "-device" and "-net". * gnu/system/vm.scm (common-qemu-options): Change "-net nic ..." to "-nic user ...". * doc/guix.texi (Installing Guix in a VM, Running Guix in a VM): Adjust examples accordingly. --- doc/guix.texi | 16 +++++++--------- gnu/build/vm.scm | 10 ++-------- gnu/system/vm.scm | 2 +- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7d50f31d20..31f26694fd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46,7 +46,7 @@ Copyright @copyright{} 2017, 2018 Carlo Zancanaro@* Copyright @copyright{} 2017 Thomas Danckaert@* Copyright @copyright{} 2017 humanitiesNerd@* Copyright @copyright{} 2017 Christopher Allan Webber@* -Copyright @copyright{} 2017, 2018 Marius Bakke@* +Copyright @copyright{} 2017, 2018, 2019 Marius Bakke@* Copyright @copyright{} 2017, 2019 Hartmut Goebel@* Copyright @copyright{} 2017, 2019 Maxim Cournoyer@* Copyright @copyright{} 2017, 2018, 2019 Tobias Geerinckx-Rice@* @@ -2472,7 +2472,7 @@ Boot the USB installation image in an VM: @example qemu-system-x86_64 -m 1024 -smp 1 -enable-kvm \ - -net user -net nic,model=virtio -boot menu=on,order=d \ + -nic user,model=virtio-net-pci -boot menu=on,order=d \ -drive file=guix-system.img \ -drive media=cdrom,file=guix-system-install-@value{VERSION}.@var{system}.iso @end example @@ -26514,7 +26514,7 @@ vm-image} on x86_64 hardware: @example $ qemu-system-x86_64 \ - -net user -net nic,model=virtio \ + -nic user,model=virtio-net-pci \ -enable-kvm -m 1024 \ -device virtio-blk,drive=myhd \ -drive if=none,file=/tmp/qemu-image,id=myhd @@ -26527,14 +26527,12 @@ Here is what each of these options means: This specifies the hardware platform to emulate. This should match the host. -@item -net user +@item -nic user,model=virtio-net-pci Enable the unprivileged user-mode network stack. The guest OS can access the host but not vice versa. This is the simplest way to get the -guest OS online. - -@item -net nic,model=virtio -You must create a network interface of a given model. If you do not -create a NIC, the boot will fail. Assuming your hardware platform is +guest OS online. @code{model} specifies which network device to emulate: +@code{virtio-net-pci} is a special device made for virtualized operating +systems and recommended for most uses. Assuming your hardware platform is x86_64, you can get a list of available NIC models by running @command{qemu-system-x86_64 -net nic,model=help}. diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 89d685b352..9a9e5bd001 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -131,14 +131,7 @@ the #:references-graphs parameter of 'derivation'." ;; The serial port name differs between emulated ;; architectures/machines. " console=" - (if target-arm? "ttyAMA0" "ttyS0")) - - ;; NIC is not supported on ARM "virt" machine, so use a user mode - ;; network stack instead. - ,@(if target-arm? - '("-device" "virtio-net-pci,netdev=mynet" - "-netdev" "user,id=mynet") - '("-net" "nic,model=virtio")))) + (if target-arm? "ttyAMA0" "ttyS0")))) (when make-disk-image? (format #t "creating ~a image of ~,2f MiB...~%" @@ -163,6 +156,7 @@ the #:references-graphs parameter of 'derivation'." ;; CPU with the maximum possible feature set otherwise. "-cpu" "max" "-m" (number->string memory-size) + "-nic" "user,model=virtio-net-pci" "-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng" "-device" "virtio-rng-pci,rng=guixsd-vm-rng" "-virtfs" diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 8609bd2ace..5ee9855ae5 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -927,7 +927,7 @@ with '-virtfs' options for the host file systems listed in SHARED-FS." '()) "-no-reboot" - "-net nic,model=virtio" + "-nic" "user,model=virtio-net-pci" "-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng" "-device" "virtio-rng-pci,rng=guixsd-vm-rng" -- 2.24.0 ------------=_1576703582-10527-1--