GNU bug report logs -
#41961
[PATCH 0/1] services: childhurd: Support more than one instance.
Previous Next
Full log
Message #14 received at 41961 <at> debbugs.gnu.org (full text, mbox):
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 <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com
This bug report was last modified 5 years and 54 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.