From unknown Wed Sep 10 13:55:50 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41961] [PATCH 0/1] services: childhurd: Support more than one instance. Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Jun 2020 09:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41961 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41961@debbugs.gnu.org Cc: rekado@elephly.net, Jan Nieuwenhuizen X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159264463130444 (code B ref -1); Sat, 20 Jun 2020 09:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jun 2020 09:17:11 +0000 Received: from localhost ([127.0.0.1]:57308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmZcZ-0007uv-WD for submit@debbugs.gnu.org; Sat, 20 Jun 2020 05:17:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:45272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmZcV-0007ul-RV for submit@debbugs.gnu.org; Sat, 20 Jun 2020 05:17:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmZcV-0002KH-4b for guix-patches@gnu.org; Sat, 20 Jun 2020 05:17:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37055) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmZcS-000776-JW; Sat, 20 Jun 2020 05:17:01 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=34768 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jmZcR-00056W-T7; Sat, 20 Jun 2020 05:17:00 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Sat, 20 Jun 2020 11:16:56 +0200 Message-Id: <20200620091656.6804-1-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (---) From: Jan Nieuwenhuizen Hi! The first thing "someone" asked me when we finally got this amazing service running and were still pretty excited about it, was can we have more than one Childhurd per host?[0] Sounds like appreciation combined with a valid request, especially since it implies the intention to setup some serious Hurd build nodes ;-) Running two Childhurd instances on my laptop right now, using this configuration --8<---------------cut here---------------start------------->8--- (service hurd-vm-service-type (hurd-vm-configuration (disk-size (* 5000 (expt 2 20))) ;5G (memory-size 1024))) (service hurd-vm-service-type (hurd-vm-configuration (os (operating-system (inherit %hurd-vm-operating-system) (host-name "childhurd1"))) (id 1))) --8<---------------cut here---------------end--------------->8--- look: --8<---------------cut here---------------start------------->8--- $ sudo herd status | grep hurd + hurd-vm + hurd-vm1 11:10:46 janneke@dundal:~/src/guix/master [env] $ ssh childhurd 'hostname; df --si / 2>/dev/null | tail -1' childhurd - 5.3G 934M 4.1G 19% / 11:11:00 janneke@dundal:~/src/guix/master [env] $ ssh childhurd1 'hostname; df --si / 2>/dev/null | tail -1' childhurd1 - 1.3G 894M 272M 77% / --8<---------------cut here---------------end--------------->8--- Greetings, Janneke [0] http://logs.guix.gnu.org/guix/2020-06-13.log#001939 Jan (janneke) Nieuwenhuizen (1): services: childhurd: Support more than one instance. doc/guix.texi | 35 ++++++++++++++++++++-------- gnu/services/virtualization.scm | 41 +++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 18 deletions(-) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From unknown Wed Sep 10 13:55:50 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance. References: <20200620091656.6804-1-janneke@gnu.org> In-Reply-To: <20200620091656.6804-1-janneke@gnu.org> Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Jun 2020 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41961 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41961@debbugs.gnu.org Cc: rekado@elephly.net Received: via spool by 41961-submit@debbugs.gnu.org id=B41961.159264476730690 (code B ref 41961); Sat, 20 Jun 2020 09:20:02 +0000 Received: (at 41961) by debbugs.gnu.org; 20 Jun 2020 09:19:27 +0000 Received: from localhost ([127.0.0.1]:57323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmZep-0007yw-0h for submit@debbugs.gnu.org; Sat, 20 Jun 2020 05:19:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmZen-0007yj-Dd for 41961@debbugs.gnu.org; Sat, 20 Jun 2020 05:19:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37067) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmZei-0007JC-6q; Sat, 20 Jun 2020 05:19:20 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=34770 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jmZeh-0005E5-6o; Sat, 20 Jun 2020 05:19:19 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Sat, 20 Jun 2020 11:19:18 +0200 Message-Id: <20200620091918.6868-1-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (---) * gnu/services/virtualization.scm ()[id,net-options]: New fields. (hurd-vm-net-options): New prodecure. Parameterize port forwarding with ID. * gnu/services/virtualization.scm (hurd-vm-shepherd-service): Use them. Parameterize provision with ID, if set. * doc/guix.texi (Virtualization Services): Document new fields. --- doc/guix.texi | 35 ++++++++++++++++++++-------- gnu/services/virtualization.scm | 41 +++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2268e159a2..59f8a89387 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -24728,12 +24728,31 @@ The size of the disk image. @item @code{memory-size} (default: @code{512}) The memory size of the Virtual Machine in mebibytes. -@item @code{options} (default: @code{'("--device"} @code{"rtl8139,netdev=net0"} @ - @code{"--netdev"} @ - @code{"user,id=net0,hostfwd=tcp:127.0.0.1:20022-:2222,hostfwd=tcp:127.0.0.1:25900-:5900"} @ - @code{"--snapshot"} @ - @code{"--hda")}) +@item @code{options} (default: @code{'("--snapshot" "--hda")}) The extra options for running QEMU. + +@item @code{id} (default: @code{#f}) +If set, a non-zero positive integer used to parameterize Childhurd +instances. It is appended to the service's name, +e.g. @code{childhurd1}. + +@item @code{net-options} (default: @var{hurd-vm-net-options}) +The procedure used to produce the list of QEMU networking options. + +By default, it produces + +@lisp +'("--device" "rtl8139,netdev=net0" + "--netdev" "user,id=net0\ + ,hostfwd=tcp:127.0.0.1:-:2222\ + ,hostfwd=tcp:127.0.0.1:-:5900") +@end lisp +with forwarded ports +@example +: @code{(+ 10022 (* 1000 @var{ID}))} +: @code{(+ 15900 (* 1000 @var{ID}))} +@end example + @end table @end deftp @@ -24745,10 +24764,8 @@ the @code{--snapshot} flag using something along these lines: @lisp (service hurd-vm-service-type (hurd-vm-configuration - (image (const "/out/of/store/writable/hurd.img")) - (options '("--device" "rtl8139,netdev=net0" - "--netdev" - "user,id=net0,hostfwd=tcp:127.0.0.1:20022-:2222")))) + (image (const "/out/of/store/writable/hurd.img")) + (options '("--hda")))) @end lisp @node Version Control Services diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index 4e96607680..e60d169791 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -51,6 +51,10 @@ #:export (%hurd-vm-operating-system hurd-vm-configuration + hurd-vm-disk-image + hurd-vm-id + hurd-vm-net-options + hurd-vm-options hurd-vm-service-type libvirt-configuration @@ -833,13 +837,13 @@ functionality of the kernel Linux."))) (default 512)) (options hurd-vm-configuration-options ;list of string (default - `("--device" "rtl8139,netdev=net0" - "--netdev" ,(string-append - "user,id=net0" - ",hostfwd=tcp:127.0.0.1:20022-:2222" - ",hostfwd=tcp:127.0.0.1:25900-:5900") - "--snapshot" - "--hda")))) + `("--snapshot" + "--hda"))) + (id hurd-vm-configuration-id ;#f or integer [1..] + (default #f)) + (net-options hurd-vm-configuration-net-options ;list of string + (thunked) + (default (hurd-vm-net-options this-record)))) (define (hurd-vm-disk-image config) "Return a disk-image for the Hurd according to CONFIG." @@ -851,26 +855,45 @@ functionality of the kernel Linux."))) (size disk-size) (operating-system os))))) +(define (hurd-vm-net-options config) + (let ((id (or (hurd-vm-configuration-id config) 0))) + (define (qemu-vm-port base) + (number->string (+ base (* 1000 id)))) + `("--device" "rtl8139,netdev=net0" + "--netdev" ,(string-append + "user,id=net0" + ",hostfwd=tcp:127.0.0.1:" (qemu-vm-port 10022) "-:2222" + ",hostfwd=tcp:127.0.0.1:" (qemu-vm-port 15900) "-:5900")))) + (define (hurd-vm-shepherd-service config) "Return a for a Hurd in a Virtual Machine with CONFIG." (let ((image (hurd-vm-configuration-image config)) (qemu (hurd-vm-configuration-qemu config)) (memory-size (hurd-vm-configuration-memory-size config)) - (options (hurd-vm-configuration-options config))) + (options (hurd-vm-configuration-options config)) + (id (hurd-vm-configuration-id config)) + (net-options (hurd-vm-configuration-net-options config)) + (provisions '(hurd-vm childhurd))) (define vm-command #~(list (string-append #$qemu "/bin/qemu-system-i386") #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) "-m" (number->string #$memory-size) + #$@net-options #$@options #+image)) (list (shepherd-service (documentation "Run the Hurd in a Virtual Machine: a Childhurd.") - (provision '(hurd-vm childhurd)) + (provision (if id + (map + (cute symbol-append <> + (string->symbol (number->string id))) + provisions) + provisions)) (requirement '(networking)) (start #~(make-forkexec-constructor #$vm-command)) (stop #~(make-kill-destructor)))))) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From unknown Wed Sep 10 13:55:50 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Jun 2020 08:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41961 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Jan \(janneke\) Nieuwenhuizen" Cc: rekado@elephly.net, 41961@debbugs.gnu.org Received: via spool by 41961-submit@debbugs.gnu.org id=B41961.159272865826385 (code B ref 41961); Sun, 21 Jun 2020 08:38:01 +0000 Received: (at 41961) by debbugs.gnu.org; 21 Jun 2020 08:37:38 +0000 Received: from localhost ([127.0.0.1]:59182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmvTt-0006rV-KD for submit@debbugs.gnu.org; Sun, 21 Jun 2020 04:37:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmvTq-0006rH-Io for 41961@debbugs.gnu.org; Sun, 21 Jun 2020 04:37:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50839) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmvTk-0002XA-ST; Sun, 21 Jun 2020 04:37:28 -0400 Received: from [2a01:e0a:fa:a50:c197:d1c7:eca2:d02] (port=45282 helo=meru) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jmvTk-0001EX-BB; Sun, 21 Jun 2020 04:37:28 -0400 From: Mathieu Othacehe References: <20200620091656.6804-1-janneke@gnu.org> <20200620091918.6868-1-janneke@gnu.org> Date: Sun, 21 Jun 2020 10:37:26 +0200 In-Reply-To: <20200620091918.6868-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Sat, 20 Jun 2020 11:19:18 +0200") Message-ID: <87366o6chl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 (---) Hey janneke! > * gnu/services/virtualization.scm ()[id,net-options]: > New fields. > (hurd-vm-net-options): New prodecure. Parameterize port forwarding with ID. ^ typo > +@item @code{options} (default: @code{'("--snapshot" "--hda")}) > The extra options for running QEMU. Does it really make sense to have "--hda" standalone here, without a specific image argument? > + (net-options hurd-vm-configuration-net-options ;list of string > + (thunked) > + (default (hurd-vm-net-options this-record)))) Why does it need to be thunked? Otherwise this looks nice! Thanks, Mathieu From unknown Wed Sep 10 13:55:50 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Jun 2020 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41961 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: rekado@elephly.net, 41961@debbugs.gnu.org Received: via spool by 41961-submit@debbugs.gnu.org id=B41961.159273041329143 (code B ref 41961); Sun, 21 Jun 2020 09:07:01 +0000 Received: (at 41961) by debbugs.gnu.org; 21 Jun 2020 09:06:53 +0000 Received: from localhost ([127.0.0.1]:59201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmvwD-0007Zz-Dh for submit@debbugs.gnu.org; Sun, 21 Jun 2020 05:06:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmvwB-0007Zm-VD for 41961@debbugs.gnu.org; Sun, 21 Jun 2020 05:06:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51017) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmvw6-0006UJ-HI; Sun, 21 Jun 2020 05:06:46 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=34178 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jmvw4-0004Jv-8Y; Sun, 21 Jun 2020 05:06:45 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20200620091656.6804-1-janneke@gnu.org> <20200620091918.6868-1-janneke@gnu.org> <87366o6chl.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 21 Jun 2020 11:06:41 +0200 In-Reply-To: <87366o6chl.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 21 Jun 2020 10:37:26 +0200") Message-ID: <875zbk3hzy.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-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 (---) Mathieu Othacehe writes: Hey Mathieu, >> * gnu/services/virtualization.scm ()[id,net-optio= ns]: >> New fields. >> (hurd-vm-net-options): New prodecure. Parameterize port forwarding with= ID. > ^ > typo Oops, thanks. >> +@item @code{options} (default: @code{'("--snapshot" "--hda")}) >> The extra options for running QEMU. > > Does it really make sense to have "--hda" standalone here, without a > specific image argument? Hmm...yes, this looked a bit awkward to me too. It's being used like this: o--8<---------------cut here---------------start------------->8--- (let ((image (hurd-vm-configuration-image config)) ...) (define vm-command #~(list (string-append #$qemu "/bin/qemu-system-i386") #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) "-m" (number->string #$memory-size) #$@net-options #$@options #+image)) --8<---------------cut here---------------end--------------->8--- so that you can play with options and image; have the "hurd-vm-configuration-image" procedure to return anything, something that may require something else than --hda ...but it's quite implicit. Ideas? >> + (net-options hurd-vm-configuration-net-options ;list of string >> + (thunked) >> + (default (hurd-vm-net-options this-record)))) > > Why does it need to be thunked? It uses ID from the configuration like so --8<---------------cut here---------------start------------->8--- (define (hurd-vm-net-options config) (let ((id (or (hurd-vm-configuration-id config) 0))) (define (qemu-vm-port base) (number->string (+ base (* 1000 id)))) [...] ",hostfwd=3Dtcp:127.0.0.1:" (qemu-vm-port 10022) "-:2222" [...])) --8<---------------cut here---------------end--------------->8--- to fix parameterize the ports for QEMU. Is there a better way to do that? > Otherwise this looks nice! Great, thanks! Greetigs, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From unknown Wed Sep 10 13:55:50 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Jun 2020 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41961 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jan Nieuwenhuizen Cc: rekado@elephly.net, 41961@debbugs.gnu.org Received: via spool by 41961-submit@debbugs.gnu.org id=B41961.159273266932761 (code B ref 41961); Sun, 21 Jun 2020 09:45:02 +0000 Received: (at 41961) by debbugs.gnu.org; 21 Jun 2020 09:44:29 +0000 Received: from localhost ([127.0.0.1]:59251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmwWb-0008WL-DO for submit@debbugs.gnu.org; Sun, 21 Jun 2020 05:44:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmwWY-0008W6-Il for 41961@debbugs.gnu.org; Sun, 21 Jun 2020 05:44:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51526) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmwWT-00031b-2C; Sun, 21 Jun 2020 05:44:21 -0400 Received: from [2a01:e0a:fa:a50:34a1:eac3:9800:4a6e] (port=53190 helo=meru) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jmwWS-00009U-L4; Sun, 21 Jun 2020 05:44:20 -0400 From: Mathieu Othacehe References: <20200620091656.6804-1-janneke@gnu.org> <20200620091918.6868-1-janneke@gnu.org> <87366o6chl.fsf@gnu.org> <875zbk3hzy.fsf@gnu.org> Date: Sun, 21 Jun 2020 11:44:18 +0200 In-Reply-To: <875zbk3hzy.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Sun, 21 Jun 2020 11:06:41 +0200") Message-ID: <87pn9s4utp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 (---) > Hmm...yes, this looked a bit awkward to me too. It's being used like > this: > > o--8<---------------cut here---------------start------------->8--- > (let ((image (hurd-vm-configuration-image config)) > ...) > (define vm-command > #~(list > (string-append #$qemu "/bin/qemu-system-i386") > #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) > "-m" (number->string #$memory-size) > #$@net-options > #$@options > #+image)) What about having something like: --8<---------------cut here---------------start------------->8--- (define vm-command #~(list (string-append #$qemu "/bin/qemu-system-i386") #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) "-m" (number->string #$memory-size) #$@options #+@(list "--hda" image))) --8<---------------cut here---------------end--------------->8--- instead? > to fix parameterize the ports for QEMU. Is there a better way to do > that? Oh I see, then it's fine I guess. Thanks, Mathieu From unknown Wed Sep 10 13:55:50 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: "Jan (janneke) Nieuwenhuizen" Subject: bug#41961: closed (Re: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance.) Message-ID: References: <87wo40zo0w.fsf@gnu.org> <20200620091656.6804-1-janneke@gnu.org> X-Gnu-PR-Message: they-closed 41961 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 41961@debbugs.gnu.org Date: Sun, 21 Jun 2020 10:56:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1592736962-15718-1" This is a multi-part message in MIME format... ------------=_1592736962-15718-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #41961: [PATCH 0/1] services: childhurd: Support more than one instance. 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 41961@debbugs.gnu.org. --=20 41961: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41961 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1592736962-15718-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 41961-done) by debbugs.gnu.org; 21 Jun 2020 10:55:54 +0000 Received: from localhost ([127.0.0.1]:59289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmxdi-00045A-7i for submit@debbugs.gnu.org; Sun, 21 Jun 2020 06:55:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmxdd-00044r-Gg for 41961-done@debbugs.gnu.org; Sun, 21 Jun 2020 06:55:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51864) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmxdY-0004oJ-0c; Sun, 21 Jun 2020 06:55:44 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=35074 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jmxdJ-00051N-Ts; Sun, 21 Jun 2020 06:55:31 -0400 From: Jan Nieuwenhuizen To: Mathieu Othacehe Subject: Re: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance. Organization: AvatarAcademy.nl References: <20200620091656.6804-1-janneke@gnu.org> <20200620091918.6868-1-janneke@gnu.org> <87366o6chl.fsf@gnu.org> <875zbk3hzy.fsf@gnu.org> <87pn9s4utp.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 21 Jun 2020 12:55:27 +0200 In-Reply-To: <87pn9s4utp.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 21 Jun 2020 11:44:18 +0200") Message-ID: <87wo40zo0w.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41961-done Cc: rekado@elephly.net, 41961-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: -3.3 (---) Mathieu Othacehe writes: >> Hmm...yes, this looked a bit awkward to me too. It's being used like >> this: >> >> o--8<---------------cut here---------------start------------->8--- >> (let ((image (hurd-vm-configuration-image config)) >> ...) >> (define vm-command >> #~(list >> (string-append #$qemu "/bin/qemu-system-i386") >> #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) >> "-m" (number->string #$memory-size) >> #$@net-options >> #$@options >> #+image)) > > What about having something like: > > (define vm-command > #~(list > (string-append #$qemu "/bin/qemu-system-i386") > #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) > "-m" (number->string #$memory-size) > #$@options > #+@(list "--hda" image))) > > instead? So we hardcode it. Simply changed to --8<---------------cut here---------------start------------->8--- (define vm-command #~(list (string-append #$qemu "/bin/qemu-system-i386") #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) "-m" (number->string #$memory-size) #$@net-options #$@options "--hda" #+image)) --8<---------------cut here---------------end--------------->8--- I guess that's better than the original fragile softcoding, because it's more robust and we have no usecase for changing '--hda' yet. Maybe I'm a bit too inclined to always enable the user to override stuff, even if I cannot imagine its use case yet :-) Pushed to master as, b7249aa4726193653e05e694ec4bb311aa4ec6c2. Thanks, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com ------------=_1592736962-15718-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Jun 2020 09:17:11 +0000 Received: from localhost ([127.0.0.1]:57308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmZcZ-0007uv-WD for submit@debbugs.gnu.org; Sat, 20 Jun 2020 05:17:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:45272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmZcV-0007ul-RV for submit@debbugs.gnu.org; Sat, 20 Jun 2020 05:17:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmZcV-0002KH-4b for guix-patches@gnu.org; Sat, 20 Jun 2020 05:17:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37055) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmZcS-000776-JW; Sat, 20 Jun 2020 05:17:01 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=34768 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jmZcR-00056W-T7; Sat, 20 Jun 2020 05:17:00 -0400 From: "Jan (janneke) Nieuwenhuizen" To: guix-patches@gnu.org Subject: [PATCH 0/1] services: childhurd: Support more than one instance. Date: Sat, 20 Jun 2020 11:16:56 +0200 Message-Id: <20200620091656.6804-1-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: rekado@elephly.net, Jan Nieuwenhuizen 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 (---) From: Jan Nieuwenhuizen Hi! The first thing "someone" asked me when we finally got this amazing service running and were still pretty excited about it, was can we have more than one Childhurd per host?[0] Sounds like appreciation combined with a valid request, especially since it implies the intention to setup some serious Hurd build nodes ;-) Running two Childhurd instances on my laptop right now, using this configuration --8<---------------cut here---------------start------------->8--- (service hurd-vm-service-type (hurd-vm-configuration (disk-size (* 5000 (expt 2 20))) ;5G (memory-size 1024))) (service hurd-vm-service-type (hurd-vm-configuration (os (operating-system (inherit %hurd-vm-operating-system) (host-name "childhurd1"))) (id 1))) --8<---------------cut here---------------end--------------->8--- look: --8<---------------cut here---------------start------------->8--- $ sudo herd status | grep hurd + hurd-vm + hurd-vm1 11:10:46 janneke@dundal:~/src/guix/master [env] $ ssh childhurd 'hostname; df --si / 2>/dev/null | tail -1' childhurd - 5.3G 934M 4.1G 19% / 11:11:00 janneke@dundal:~/src/guix/master [env] $ ssh childhurd1 'hostname; df --si / 2>/dev/null | tail -1' childhurd1 - 1.3G 894M 272M 77% / --8<---------------cut here---------------end--------------->8--- Greetings, Janneke [0] http://logs.guix.gnu.org/guix/2020-06-13.log#001939 Jan (janneke) Nieuwenhuizen (1): services: childhurd: Support more than one instance. doc/guix.texi | 35 ++++++++++++++++++++-------- gnu/services/virtualization.scm | 41 +++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 18 deletions(-) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com ------------=_1592736962-15718-1--