On Sat, May 13, 2017 at 03:59:24PM +0200, Ludovic Courtès wrote: > Leo Famulari <l...@famulari.name> skribis: > > If possible, I would appreciate if the release included a QEMU image > > that we could offer to VPS hosters like serveraptor.com, as discussed in > > this thread: > > > > If the maintainers want to try for this, I'm happy to help prepare a > > system declaration and test it.
I'll work on the system declaration shortly. I think it should take some parts from installation-os from (gnu system install), but the file-systems can be simplified, and the packages reduced. > The main “difficulty” would be to adjust the “Download” page on the web > site, the instructions in the manual, “make release”, and to come up > with a clear file name for the new image. I think the name should be "guixsd-vm-image-VERSION", since this follows the convention established with `guix system vm-image`. I've attached some rough patches for guix.git and guix-artwork.git. I'm confused about `make release`. The for-loop that builds the disk images doesn't seem to set up offloading or actually build the images for the different values of $SUPPORTED_SYSTEMS [0]. Am I missing this somewhere? For the web-site, I'm struggling to set up a development environment where I can run (export-web-site) and test my changes. [0] https://git.savannah.gnu.org/cgit/guix.git/tree/Makefile.am?id=e0b2e93005188ab4d6c7413a27832ba2fb7388e8#n608
From 6ae03aa362b3542590e12c0ab2b65af127bdb00d Mon Sep 17 00:00:00 2001 From: Leo Famulari <l...@famulari.name> Date: Sat, 13 May 2017 20:44:36 -0400 Subject: [PATCH 1/2] doc: Mention the pre-built VM image. * doc/guix.texi (Running GuixSD in a VM): Mention the pre-built VM image. --- doc/guix.texi | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 844f0d74f..7b8a4fea0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15649,17 +15649,21 @@ example graph. @subsection Running GuixSD in a Virtual Machine @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. @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 image 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: @example $ qemu-system-x86_64 \ -- 2.13.0
From 30effa15369a1707755d134e37e63e2df135422e Mon Sep 17 00:00:00 2001 From: Leo Famulari <l...@famulari.name> Date: Sat, 13 May 2017 18:07:01 -0400 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. --- Makefile.am | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Makefile.am b/Makefile.am index 4b5a29a72..8663de3ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -571,12 +571,21 @@ BINARY_TARBALLS = \ # Systems supported by GuixSD. GUIXSD_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux +# Systems for which we build GuixSD VMs. +GUIXSD_VM_SYSTEMS ?= x86_64-linux + # Prefix of the GuixSD installation image file name. GUIXSD_IMAGE_BASE = guixsd-usb-install-$(PACKAGE_VERSION) +# Prefix of the GuixSD VM image file name. +GUIXSD_VM_IMAGE_BASE = guixsd-vm-image-$(PACKAGE_VERSION) + # Size of the installation image (for x86_64 typically). GUIXSD_INSTALLATION_IMAGE_SIZE ?= 950MiB +# Size of the VM image (for x86_64 typically). +GUIXSD_VM_IMAGE_SIZE ?= 2GiB + # The release process works in several phases: # # 0. We assume the developer created a 'vX.Y' tag. @@ -627,6 +636,19 @@ release: distcheck mv "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" \ "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz" ; \ done + for system in $(GUIXSD_VM_SYSTEMS) ; do \ + image=`$(top_builddir)/pre-inst-env \ + guix system vm-image \ + --image-size=$(GUIXSD_VM_IMAGE_SIZE) \ + gnu/system/install.scm` ; \ + 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 -- 2.13.0
From 584a9dfb224de28dc40692d2957d2301952378c2 Mon Sep 17 00:00:00 2001 From: Leo Famulari <l...@famulari.name> Date: Sun, 14 May 2017 15:03:57 -0400 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. --- website/www/download.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/website/www/download.scm b/website/www/download.scm index 887c6db..98f03ee 100644 --- a/website/www/download.scm +++ b/website/www/download.scm @@ -62,6 +62,15 @@ dependencies.") (define %guix-src-image "src-package.png") +(define %vm-image-description + "Virtual machine (QEMU) image of GuixSD.") + +(define %vm-image-manual + "manual/html_node/Running-GuixSD-in-a-VM.html") + +(define %vm-image-image + "GuixSD-package.png") + (define (ftp-url file) (string-append "ftp://alpha.gnu.org/gnu/guix/" file)) @@ -75,6 +84,12 @@ dependencies.") "-linux.xz")))) archs)) +(define (guixsd-vm-image-files archs) + (map (lambda (arch) + (cons arch (https-url (string-append "guixsd-vm-image-" + (latest-guix-version) "." arch + "-linux.xz")))))) + (define (guix-files archs) (map (lambda (arch) (cons arch (https-url (string-append "guix-binary-" (latest-guix-version) @@ -150,7 +165,12 @@ Linux-based system.") #:files (guix-source-files '("tarball")) #:description %source-tarball-description #:manual %source-tarball-manual - #:image %guix-src-image)) + #:image %guix-src-image) + ,(download-box (string-append "GuixSD " (latest-guix-version)) + #:files (guixsd-vm-image-files '("x86_64")) + #:description %vm-image-description + #:manual %vm-image-manual + #:image %guixsd-vm-image)) (p "Source code for the Guix System Distribution USB installation images as well as GNU Guix can be found on the GNU ftp server for " -- 2.13.0
signature.asc
Description: PGP signature