From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH 1/1] doc: Show how to boot result of 'vm-image'. Date: Sat, 23 Jan 2016 15:45:46 -0500 Message-ID: <20160123204546.GA15875@jasmine> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN54B-0007X9-Uw for guix-devel@gnu.org; Sat, 23 Jan 2016 15:45:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aN546-0006UG-Rd for guix-devel@gnu.org; Sat, 23 Jan 2016 15:45:51 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:33026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN546-0006Se-Kt for guix-devel@gnu.org; Sat, 23 Jan 2016 15:45:46 -0500 Received: from localhost (c-69-249-5-231.hsd1.pa.comcast.net [69.249.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 2BF33680119 for ; Sat, 23 Jan 2016 15:45:44 -0500 (EST) Content-Disposition: inline In-Reply-To: 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: guix-devel@gnu.org On Fri, Jan 15, 2016 at 05:12:24AM -0500, Leo Famulari wrote: > * doc/guix.texi (Invoking guix system): Explain how to boot the QEMU > images created by vm-image. > --- > doc/guix.texi | 41 ++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 38 insertions(+), 3 deletions(-) Does anyone have feedback on this addition to the manual? I'd like to have _something_ like it in the manual so that totally new users can try GuixSD. > > diff --git a/doc/guix.texi b/doc/guix.texi > index e583e8c..51165b4 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -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. > - > When using @code{disk-image}, a raw disk image is produced; it can be > copied as is to a USB stick, for instance. Assuming @code{/dev/sdc} is > the device corresponding to a USB stick, one can copy the image on it > @@ -9070,6 +9067,44 @@ using the following command: > # dd if=$(guix system disk-image my-os.scm) of=/dev/sdc > @end example > > +When using @code{vm-image}, the returned image is in qcow2 format, which > +the 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=virtio \ > +-enable-kvm \ > +-m 256 \ > +/tmp/qemu-image > +@end example > + > +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=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 > +@end example > + > @item container > Return a script to run the operating system declared in @var{file} > within a container. Containers are a set of lightweight isolation > -- > 2.6.4 > >