From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: rekado@elephly.net, 41961@debbugs.gnu.org
Subject: [bug#41961] [PATCH 1/1] services: childhurd: Support more than one instance.
Date: Sun, 21 Jun 2020 11:06:41 +0200 [thread overview]
Message-ID: <875zbk3hzy.fsf@gnu.org> (raw)
In-Reply-To: <87366o6chl.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 21 Jun 2020 10:37:26 +0200")
Mathieu Othacehe writes:
Hey Mathieu,
>> * gnu/services/virtualization.scm (<hurd-vm-configuration>)[id,net-options]:
>> 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 <image>...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=tcp: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
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next prev parent reply other threads:[~2020-06-21 9:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 9:16 [bug#41961] [PATCH 0/1] services: childhurd: Support more than one instance Jan (janneke) Nieuwenhuizen
2020-06-20 9:19 ` [bug#41961] [PATCH 1/1] " Jan (janneke) Nieuwenhuizen
2020-06-21 8:37 ` Mathieu Othacehe
2020-06-21 9:06 ` Jan Nieuwenhuizen [this message]
2020-06-21 9:44 ` Mathieu Othacehe
2020-06-21 10:55 ` bug#41961: " Jan Nieuwenhuizen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zbk3hzy.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=41961@debbugs.gnu.org \
--cc=othacehe@gnu.org \
--cc=rekado@elephly.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).