unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: David Craven <david@craven.ch>
To: help-guix@gnu.org
Subject: Re: 'guix system vm' questions
Date: Sun, 3 Jul 2016 18:09:09 +0200	[thread overview]
Message-ID: <CAL1_imn74FwAX2ZMmijOg1oZCG3j24EBeVMOyGTbuui1Gn=COw@mail.gmail.com> (raw)

@myglc2 the simplest workaround to this issue is to add -device
virtio-rng-pci to your qemu flags and patch lsh to use /dev/hwrng in
the /bin/lsh-make-seed file I linked to in a previous reply.

On Sun, Jul 3, 2016 at 6:00 PM,  <help-guix-request@gnu.org> wrote:
> Send Help-Guix mailing list submissions to
>         help-guix@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.gnu.org/mailman/listinfo/help-guix
> or, via email, send a message with subject or body 'help' to
>         help-guix-request@gnu.org
>
> You can reach the person managing the list at
>         help-guix-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Help-Guix digest..."
>
>
> Today's Topics:
>
>    1. Re: 'guix system vm' questions (myglc2)
>    2. Re: 'guix system vm' questions (myglc2)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 03 Jul 2016 09:47:42 -0400
> From: myglc2 <myglc2@gmail.com>
> To: help-guix@gnu.org
> Subject: Re: 'guix system vm' questions
> Message-ID: <86mvly6dfl.fsf@gmail.com>
> Content-Type: text/plain; charset=utf-8
>
> ludo@gnu.org (Ludovic Court?s) writes:
>
>> myglc2 <myglc2@gmail.com> skribis:
>>
>>> Leo Famulari <leo@famulari.name> writes:
>>>
>>>> On Wed, Jun 29, 2016 at 10:10:35AM -0400, Thompson, David wrote:
>>>>> On Wed, Jun 29, 2016 at 2:57 AM, myglc2 <myglc2@gmail.com> wrote:
>>>>> > I have a headless server running Guix/Debian 8.3 on which I would like
>>>>> > to run some guix vms. So far, I have a script (see mkvm.sh, attached)
>>>>> > that runs a single vm. It has some issues:
>>>>> >
>>>>> > 1) lsh-service hangs waiting for keystrokes on the QEMU console
>>>>>
>>>>> LSH needs to be initialized with a key on first boot, which is why you
>>>>> need to type to create entropy.  This sucks for automation, so I would
>>>>> recommend OpenSSH instead, but we don't have an openssh-service yet.
>>>>
>>>> In your operating system configuration, you can pass 'initialize? #f' to
>>>> lsh-service to skip the SSH seed and host-key initialization. You will
>>>> need to initialize the LSH service later, before you can use it.
>>>
>>> I tried that and ... lsh spun looking for a seed file advising me to run
>>> 'lsh-make-seed', and then stopped.
>>
>> Yeah this is expected: lshd won?t start if it cannot find a seed;
>> eventually, the Shepherd?
>>
>>> Service SSH-daemeon has started.
>>> No seed file. Please create on by running
>>> lwh-make-seed -o "/var/spool/lsh/yarrow-seed-file".
>>> lshd: No rendomness generator available.
>>> Service ssh-daemon has been disabled.
>>>   (Respawning too fast.)
>>
>> ? disables it.
>>
>>> v1 login: root
>>> root@v1 ~# lsh-make-seed
>>> -bash: lsh-make-seed: command not found
>>
>> I guess ?lsh-service-type? should be changed to extend
>> ?profile-service-type? such that this command is available.  WDYT?
>
> Well I can't see how it will help in my use case. I can't think of why
> it would be useful in practice, since lsh-make-seed is already being
> called with --sloppy by 'ssh-service initialize? #t'.
>
> The only reasons I can think of are ...
>
> - to enable a user at the console to manually reproduce what
>    'ssh-service initialize? #t' does, and
>
> - to avoid it being reported as a bug
>
> ... which is why I didn't report it as a bug.
>
> Re my use case, am I correct in believing that the only way to address
> it is to enhance lsh-service with an alternative initialization scheme
> that does not require console input?
>
> If so, maybe we should rename the current initialize to ...
>
> INITIALIZE-REQUIRING-CONSOLE-INPUT?
>
> ... and add a new one named ...
>
> INITIALIZE-UNATTENDED?
>
> WDYT? - George
>
>
>
>
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 03 Jul 2016 09:53:28 -0400
> From: myglc2 <myglc2@gmail.com>
> To: help-guix@gnu.org
> Subject: Re: 'guix system vm' questions
> Message-ID: <86inwm6d5z.fsf@gmail.com>
> Content-Type: text/plain
>
> David Craven <david@craven.ch> writes:
>
>> So I packaged rng-tools and created a shepherd service, but I realized
>> that the service needs to be started before the activation part of the
>> lsh service. What's the best way to do this?
>>
>> https://git.lysator.liu.se/lsh/lsh/blob/master/src/lsh-make-seed.c#L1075
>>
>> On Wed, Jun 29, 2016 at 8:23 PM, David Craven <david@craven.ch> wrote:
>>> HW_RANDOM_VIRTIO is enabled in the default kernel.
>>>
>>> Starting the vm like this enables the hwrng:
>>> /gnu/store/3rqbwx34kfa789jbywfbxl90nids08cf-run-vm.sh -device virtio-rng-pci
>>> and it works as can be verified by
>>> cat /dev/hwrng
>>>
>>> The only missing components from what I can tell is packaging rng-tools
>>> and adding a service to add /dev/hwrng to the entropy pool on boot.
>>>
>>> https://git.kernel.org/cgit/utils/kernel/rng-tools/rng-tools.git/
>>>
>>>> We should look into QEMU's VirtIO RNG, which could help here:
>>>> http://wiki.qemu-project.org/Features-Done/VirtIORNG
>
> This sounds great. I see you submitted patches. Am I correct in thinking
> that the next step is to add an lsh-option option that uses rmg-tools
> instead of lsh-make-seed to set the yarrow seed?
>
> TIA - George
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Help-Guix mailing list
> Help-Guix@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-guix
>
>
> ------------------------------
>
> End of Help-Guix Digest, Vol 8, Issue 4
> ***************************************

             reply	other threads:[~2016-07-03 16:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-03 16:09 David Craven [this message]
2016-07-06 16:17 ` 'guix system vm' questions myglc2
  -- strict thread matches above, loose matches on Subject: below --
2016-07-07 16:26 David Craven
2016-06-29 18:23 David Craven
2016-06-30 13:10 ` David Craven
2016-07-03 13:53   ` myglc2
2016-06-29  6:57 myglc2
2016-06-29 14:10 ` Thompson, David
2016-06-29 15:48   ` Leo Famulari
2016-07-01 20:15     ` myglc2
2016-07-02 13:06       ` Ludovic Courtès
2016-07-03 13:47         ` myglc2
2016-07-11 19:32     ` Leo Famulari
2016-06-30 21:20   ` myglc2

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='CAL1_imn74FwAX2ZMmijOg1oZCG3j24EBeVMOyGTbuui1Gn=COw@mail.gmail.com' \
    --to=david@craven.ch \
    --cc=help-guix@gnu.org \
    /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.
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).