Subject: bug#24943: Error when starting a vm-image in qemu

From: [email-masked]
Date: Fri, 18 Nov 2016 14:09:08 -0800

I thought I had included that info, but yes that does work. Part of the reason
for filing the bugreport was so that this case could be handled more elegantly
instead of bugging out and dropping a user in the REPL. Unless one is a dev, the
REPL might as well be a kernel panic, only without the (potentially) useful
timeout.

I'd personally prefer it if the image generated by vm-image could either

A) Spit out an error that there isn't a networking device found and shutdown
(not a fan, but if there is a reason vm-image /has/ to have a working network
connection, this would likely be better. Including a chance to hit a key to drop
a dev/advanced user into the REPL would be nice as well) or
B) Spit out an error and finish the booting process, with guix complaining about
no network connection any time it's needing to download something (easily the
better option).

Another option would be a a command for the REPL that would simply shut things
down (which would likely be useful in more cases than just this, depending on
how often a user might be staring at the REPL in case of critical errors).

On Tue, Nov 15, 2016 at 11:08:40AM +0100, Ludovic Courtès wrote:
> 
> ‘guix system vm-image’ produces an image that expects QEMU’s networking
> interface available as eth0 inside the host, hence the error you were
> getting.
> 
> To enable that, I think you need to do:
> 
>   qemu-system-x86_64 -net user -net nic,model=virtio …
> 
> See:
> 
>   https://www.gnu.org/software/guix/manual/html_node/Running-GuixSD-in-a-VM.html
> 
> Could you try and report back?
> 
> Thanks,
> Ludo’.