From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 1/1] doc: Show how to boot result of 'vm-image'. Date: Sun, 24 Jan 2016 18:32:57 +0100 Message-ID: <87io2iopbq.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNOXE-0001ml-0S for guix-devel@gnu.org; Sun, 24 Jan 2016 12:33:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNOX9-0004ys-10 for guix-devel@gnu.org; Sun, 24 Jan 2016 12:33:07 -0500 In-Reply-To: (Leo Famulari's message of "Fri, 15 Jan 2016 05:12:24 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Leo Famulari Cc: guix-devel@gnu.org Leo Famulari 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 opera= ting system declared > in @var{file} that stands alone. Use the @option{--image-size} option > to specify the size of the image. >=20=20 > -When using @code{vm-image}, the returned image is in qcow2 format, which > -the QEMU emulator can efficiently use. I=E2=80=99m thinking there are often questions about using GuixSD in a VM e= tc., 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 =E2=80=9CRunning GuixSD in a VM=E2=80=9D section, which could go maybe right after =E2=80=9C= Invoking guix system=E2=80=9D. 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: > + > +@example > +$ qemu-system-x86_64 \ > +-net user \ > +-net nic,model=3Dvirtio \ > +-enable-kvm \ > +-m 256 \ > +/tmp/qemu-image > +@end example I think it would be nicer to put it on 3 lines. > +And the annotated version: > + > +@example > +# 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=3Dhelp`. > +-net nic,model=3Dvirtio \ > +# 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 > +@end example I would typeset it as: @table @code @item qemu-system-x86_64 This specifies the hardware platform to=E2=80=A6 @item -net user Enable unpriviliged user-mode networking=E2=80=A6 =E2=80=A6 @end @table With all this, it=E2=80=99s 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=E2=80=99.