guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] doc: Show how to boot result of 'vm-image'.


From: Ludovic Courtès
Subject: Re: [PATCH 1/1] doc: Show how to boot result of 'vm-image'.
Date: Sun, 24 Jan 2016 18:32:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Leo Famulari <address@hidden> skribis:

> * doc/guix.texi (Invoking guix system): Explain how to boot the QEMU
> images created by vm-image.

Hey!  Sorry for the looong delay!  I think this is a useful addition.

> @@ -9058,9 +9058,6 @@ Return a virtual machine or disk image of the operating 
> system declared
>  in @var{file} that stands alone.  Use the @option{--image-size} option
>  to specify the size of the image.
>  
> -When using @code{vm-image}, the returned image is in qcow2 format, which
> -the QEMU emulator can efficiently use.

I’m thinking there are often questions about using GuixSD in a VM etc.,
so it may well deserve one or two sections of its own.

What about leaving the above sentence here, and appending:

  @xref{Running GuixSD in a VM}, for more information on how to run the
  image in a virtual machine.

?

The rest of the material you added would then go to the new “Running
GuixSD in a VM” section, which could go maybe right after “Invoking guix
system”.  WDYT?

> +When using @code{vm-image}, the returned image is in qcow2 format, which
> +the QEMU emulator can efficiently use.

In the new section, this would need to be slightly adjusted to give more
context, like:

  One way to run GuixSD in a virtual machine is to build a GuixSD
  virtual machine image using @command{guix system vm-image}
  (@pxref{Invoking guix system}).  The returned image is in qcow2
  format, which the @uref{http://qemu.org/, QEMU emulator} can
  efficiently use.

> +To run the image in QEMU, copy it out of the store and give yourself
> +permission to write to the copy. When invoking QEMU, you must choose a
> +system emulator that is suitable for your hardware platform.  Here is a
> +minimal QEMU invocation that will boot GuixSD on x86_64 hardware:
> +
> address@hidden
> +$ qemu-system-x86_64 \
> +-net user \
> +-net nic,model=virtio \
> +-enable-kvm \
> +-m 256 \
> +/tmp/qemu-image
> address@hidden example

I think it would be nicer to put it on 3 lines.

> +And the annotated version:
> +
> address@hidden
> +# Hardware platform to emulate. This should match the host.
> +$ qemu-system-x86_64 \
> +# Unpriviliged user mode networking. Guest can access host but not vice
> +# versa. If you don't choose a network stack, the boot will fail.
> +-net user \
> +# You must create a network interface of a given model. If you don't
> +# create a NIC, the boot will fail. You can get a list of available NIC
> +# models by running `qemu-system-x86_64 -net nic,model=help`.
> +-net nic,model=virtio \
> +# If your system is x86 with hardware virtualization extensions,
> +# enabling the kernel virtual machine will make things run faster.
> +-enable-kvm \
> +# RAM available to the guest OS. Defaults to 128 megabytes, which is not
> +# enough for the Guix daemon.
> +-m 256 \
> +/tmp/qemu-image
> address@hidden example

I would typeset it as:

  @table @code
  @item qemu-system-x86_64
  This specifies the hardware platform to…

  @item -net user
  Enable unpriviliged user-mode networking…
  …

  @end @table

With all this, it’s going to look perfect!  :-)

Another question that people often ask is how to install GuixSD from the
installation image in a VM.  Maybe that could be added eventually in a
subsection of this new node?

Thank you!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]