From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: Planning for the next release Date: Tue, 16 May 2017 19:03:35 -0400 Message-ID: <20170516230335.GA21926@jasmine> References: <87wpb7ym78.fsf@gnu.org> <87fugbvkdb.fsf@gnu.org> <20170512180456.GA6551@jasmine> <87mvag3lj7.fsf@gnu.org> <20170514191407.GA4673@jasmine> <87y3tyjnlo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DKU6Jbt7q3WqK7+M" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAlVH-0000Z2-2b for guix-devel@gnu.org; Tue, 16 May 2017 19:03:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAlVC-0003EW-NJ for guix-devel@gnu.org; Tue, 16 May 2017 19:03:43 -0400 Content-Disposition: inline In-Reply-To: <87y3tyjnlo.fsf@gnu.org> 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" To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel --DKU6Jbt7q3WqK7+M Content-Type: multipart/mixed; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 15, 2017 at 02:44:51PM +0200, Ludovic Court=E8s wrote: > Leo Famulari skribis: > > Subject: [PATCH 1/2] doc: Mention the pre-built VM image. > > * doc/guix.texi (Running GuixSD in a VM): Mention the pre-built VM imag= e. > > > Subject: [PATCH 2/2] maint: The 'release' target builds a VM image. > > * Makefile.am (GUIXSD_VM_SYSTEMS, GUIXSD_VM_IMAGE_BASE, > > GUIXSD_VM_IMAGE_SIZE): New variables. > > (release): Add logic to build a VM image. I took your suggestions and added 'gnu/system/examples/vm-image.tmpl' in the updated version of the patch (attached). In 'vm-image.tmpl', I put some VPS-specific suggestions related to partitioning and filesystems in the MOTD. The crux of the issue is that we don't know how large the virtual disk will be, so we need to resize the partition and filesystem after we boot. Hopefully in the future we can offer something more sophisticated, which will do this sort of task automatically. > > Subject: [PATCH] website: downloads: Mention the VM image. > > > > * website/www/download.scm (%vm-image-description, %vm-image-manual, > > %vm-image-image): New variables. > > (guixsd-vm-image-files): New procedure. > > (download-page): Use guixsd-vm-image-files. > sirgazil: do you think we should add a special icon or something for the > VM image? I had a followup question for sirgazil so I'll wait for a response: https://lists.gnu.org/archive/html/guix-devel/2017-05/msg00310.html --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-maint-The-release-target-builds-a-VM-image.patch" Content-Transfer-Encoding: quoted-printable =46rom 1c9ad17ea0b64b29117e49526ff07d2e7e7c6c13 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Sat, 13 May 2017 20:44:36 -0400 Subject: [v2] maint: The 'release' target builds a VM image. * Makefile.am (GUIXSD_VM_SYSTEMS, GUIXSD_VM_IMAGE_BASE, GUIXSD_VM_IMAGE_SIZE): New variables. (release): Add logic to build a VM image. * gnu/system/examples/vm-image.tmpl: New file. * doc/guix.texi (Running GuixSD in a VM, Installing GuixSD in a VM): Mentio= n the pre-built VM image. --- Makefile.am | 24 ++++++++++++++++++ doc/guix.texi | 29 +++++++++++++-------- gnu/system/examples/vm-image.tmpl | 53 +++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 95 insertions(+), 11 deletions(-) create mode 100644 gnu/system/examples/vm-image.tmpl diff --git a/Makefile.am b/Makefile.am index 5bfc9ca88..0b12c6484 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,7 @@ # Copyright =A9 2016 Mathieu Lirzin # Copyright =A9 2016, 2017 Mark H Weaver # Copyright =A9 2017 Mathieu Othacehe +# Copyright =A9 2017 Leo Famulari # # This file is part of GNU Guix. # @@ -571,12 +572,21 @@ BINARY_TARBALLS =3D \ # Systems supported by GuixSD. GUIXSD_SUPPORTED_SYSTEMS ?=3D x86_64-linux i686-linux =20 +# Systems for which we build GuixSD VMs. +GUIXSD_VM_SYSTEMS ?=3D x86_64-linux + # Prefix of the GuixSD installation image file name. GUIXSD_IMAGE_BASE =3D guixsd-usb-install-$(PACKAGE_VERSION) =20 +# Prefix of the GuixSD VM image file name. +GUIXSD_VM_IMAGE_BASE =3D guixsd-vm-image-$(PACKAGE_VERSION) + # Size of the installation image (for x86_64 typically). GUIXSD_INSTALLATION_IMAGE_SIZE ?=3D 950MiB =20 +# Size of the VM image (for x86_64 typically). +GUIXSD_VM_IMAGE_SIZE ?=3D 2GiB + # The release process works in several phases: # # 0. We assume the developer created a 'vX.Y' tag. @@ -631,6 +641,20 @@ release: dist mv "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" \ "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz" ; \ done + for system in $(GUIXSD_VM_SYSTEMS) ; do \ + image=3D`$(top_builddir)/pre-inst-env \ + guix system vm-image \ + --system=3D$$system \ + --image-size=3D$(GUIXSD_VM_IMAGE_SIZE) \ + gnu/system/examples/vm-image.tmpl` ; \ + if [ ! -f "$$image" ] ; then \ + echo "failed to produced GuixSD VM image for $$system" >&2 ; \ + exit 1 ; \ + fi ; \ + xz < "$$image" > "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz.tmp= " ; \ + mv "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz.tmp" \ + "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz" ; \ + done @echo @echo "Congratulations! All the release files are now in $(releasedir)." @echo diff --git a/doc/guix.texi b/doc/guix.texi index b272fcec8..e6a9706b9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7628,8 +7628,11 @@ good. @subsection Installing GuixSD in a Virtual Machine =20 @cindex virtual machine, GuixSD installation -If you'd like to install GuixSD in a virtual machine (VM) rather than on -your beloved machine, this section is for you. +@cindex virtual private server (VPS) +@cindex VPS (virtual private server) +If you'd like to install GuixSD in a virtual machine (VM) or on a +virtual private server (VPS) rather than on your beloved machine, this +section is for you. =20 To boot a @uref{http://qemu.org/,QEMU} VM for installing GuixSD in a disk image, follow these steps: @@ -15687,17 +15690,21 @@ example graph. @subsection Running GuixSD in a Virtual Machine =20 @cindex virtual machine -One way to run GuixSD in a virtual machine (VM) 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 GuixSD in a virtual machine (VM), one can either use the +pre-built GuixSD VM image distributed at +@indicateurl{ftp://alpha.gnu.org/guix/guixsd-vm-image-@value{VERSION}.@var= {system}.tar.xz} +, or build their own 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. =20 @cindex QEMU -To run the image in QEMU, copy it out of the store (@pxref{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 the result -of @command{guix system vm-image} on x86_64 hardware: +If you built your own image, you must copy it out of the store +(@pxref{The Store}) and give yourself permission to write to the copy +before you can use it. 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 the result of @command{guix system +vm-image} on x86_64 hardware: =20 @example $ qemu-system-x86_64 \ diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-ima= ge.tmpl new file mode 100644 index 000000000..57ac71c53 --- /dev/null +++ b/gnu/system/examples/vm-image.tmpl @@ -0,0 +1,53 @@ +;;; This is an operating system configuration template for a "bare-bones" = setup, +;;; suitable for booting in a virtualized environment, including virtual p= rivate +;;; servers (VPS). + +(use-modules (gnu)) +(use-package-modules bootloaders disk nvi) + +(define vm-image-motd (plain-file "motd" " +This is the GNU system. Welcome! + +This instance of GuixSD is a bare-bones template for virtualized environme= nts. + +You will probably want to do these things first if you booted in a virtual +private server (VPS): + +* Set a password for 'root'. +* Set up networking. +* Expand the root partition to fill the space available by 0) deleting and +recreating the partition with fdisk, 1) reloading the partition table with +partprobe, and then 2) resizing the filesystem with resize2fs.\n")) + +(operating-system + (host-name "gnu") + (timezone "Etc/UTC") + (locale "en_US.utf8") + + ;; Assuming /dev/sdX is the target hard disk, and "my-root" is + ;; the label of the target root file system. + (bootloader (grub-configuration (device "/dev/sda") + (terminal-outputs '(console)))) + (file-systems (cons (file-system + (device "my-root") + (title 'label) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + + ;; This is where user accounts are specified. The "root" + ;; account is implicit, and is initially created with the + ;; empty password. + (users %base-user-accounts) + + ;; Globally-installed packages. + (packages (cons* nvi fdisk + grub ; mostly so xrefs to its manual work + parted ; partprobe + %base-packages)) + + (services (modify-services %base-services + (login-service-type config =3D> + (login-configuration + (inherit config) + (motd vm-image-motd)))))) --=20 2.13.0 --Nq2Wo0NMKNjxTN9z-- --DKU6Jbt7q3WqK7+M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlkbhUEACgkQJkb6MLrK fwg6/hAA2NA93GabRZ1ZToVxuKobR9M4z/d2YAjQNwNJrwkUafCo6Mcm+9bzRE0P njzUkN1QeYBO2s8JdATbbspYymdrAIBz2BZew8Z3HsrqvHdOqN4TPXbwui5GzCMJ m4OJf7hTyyiLLu8gzIjkWEm6ZS2f+WIQpLxGqKwWrXbbNXh7gUNGGpW8VpM0CDji VLtGkxdsp1TBrObLxdaKekHmtiPdVeZmkt24Zc9AV7QhfQu/vOWww/SoJ7LwGZzJ QlEdqjmtBw7qbFLAnEwZbPE58pkd8fUTu5u7kXF4UAPbWmUukZFi9o6KtWkBsg8/ CdtfLzNPZpVnWfDoEUS2Vue2UnaXXBqRi79aSqZQCywHqKlnj2utMWNysv1xvcrq HFLRGg2yQ1ncc37cEOQCQxyLLbImjWgUjLXFBUlJb5ARs39piQjM5KqoNjZ/+Emy j7DcO2c3DtyUTQd7kStDO6B15qsakkNCUOZlwBkr2LTOuvJMy74F8dIM5UO2GltG razqj5xR4/aoOV+991hAzxXw5TtCShyWqdAW/kStv0JWQmtQhwsSkY5yh4VU5BTO tn8WJvCLNPT8YLptBakBt52WNUZMNh/XZW9cUuHV3EImEi3OEcHgZhK/pZSipKMQ lq8veMQVGXGl8TXBESzchfhb85gcEuHan8ldO8vBS60gYsyg6UY= =SIx5 -----END PGP SIGNATURE----- --DKU6Jbt7q3WqK7+M--