From: Leo Famulari <leo@famulari.name>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Planning for the next release
Date: Tue, 16 May 2017 19:03:35 -0400 [thread overview]
Message-ID: <20170516230335.GA21926@jasmine> (raw)
In-Reply-To: <87y3tyjnlo.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 1490 bytes --]
On Mon, May 15, 2017 at 02:44:51PM +0200, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> 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 image.
>
> > 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
[-- Attachment #1.2: 0001-maint-The-release-target-builds-a-VM-image.patch --]
[-- Type: text/plain, Size: 7520 bytes --]
From 1c9ad17ea0b64b29117e49526ff07d2e7e7c6c13 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
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): Mention 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 © 2016 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2016, 2017 Mark H Weaver <mhw@netris.org>
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+# Copyright © 2017 Leo Famulari <leo@famulari.name>
#
# This file is part of GNU Guix.
#
@@ -571,12 +572,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.
@@ -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=`$(top_builddir)/pre-inst-env \
+ guix system vm-image \
+ --system=$$system \
+ --image-size=$(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
@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.
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
@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 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:
@example
$ qemu-system-x86_64 \
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.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 private
+;;; 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 environments.
+
+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 =>
+ (login-configuration
+ (inherit config)
+ (motd vm-image-motd))))))
--
2.13.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-05-16 23:03 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 12:37 Planning for the next release Ludovic Courtès
2017-03-31 13:57 ` ng0
2017-03-31 16:25 ` Ludovic Courtès
2017-03-31 16:33 ` ng0
2017-03-31 23:07 ` Leo Famulari
2017-04-01 7:24 ` ng0
2017-04-04 10:39 ` Ricardo Wurmus
2017-05-20 8:40 ` Ludovic Courtès
2017-05-20 10:51 ` Ricardo Wurmus
2017-05-20 12:15 ` Ludovic Courtès
2017-05-20 21:45 ` Ricardo Wurmus
2017-05-20 22:29 ` Ludovic Courtès
2017-05-20 15:14 ` Ludovic Courtès
2017-05-20 19:40 ` Marius Bakke
2017-05-20 21:40 ` Marius Bakke
2017-05-20 22:32 ` Ludovic Courtès
2017-05-20 23:18 ` Ludovic Courtès
2017-05-20 21:42 ` Ricardo Wurmus
2017-04-02 22:13 ` Marius Bakke
2017-04-03 8:23 ` Ludovic Courtès
2017-04-17 20:41 ` UEFI support in boot image Marius Bakke
2017-04-19 20:26 ` Ludovic Courtès
2017-04-19 21:43 ` Marius Bakke
2017-05-05 20:54 ` Ludovic Courtès
2017-05-06 14:49 ` Marius Bakke
2017-05-07 14:42 ` Marius Bakke
2017-04-03 0:28 ` Planning for the next release Leo Famulari
2017-04-03 8:26 ` Ludovic Courtès
2017-04-03 17:52 ` Leo Famulari
2017-04-04 11:56 ` Ludovic Courtès
2017-04-21 22:27 ` Ludovic Courtès
2017-04-21 22:33 ` Leo Famulari
2017-04-27 12:40 ` Ricardo Wurmus
2017-05-11 9:00 ` Ludovic Courtès
2017-05-12 5:45 ` Ricardo Wurmus
2017-05-12 12:13 ` Hartmut Goebel
2017-05-12 15:25 ` Ludovic Courtès
2017-05-12 18:50 ` Ricardo Wurmus
[not found] ` <CAFtzXzMOGmQ6PKxarkmAKENR0EkWsfVoN7qdUjsnvZ6fgrAdTA@mail.gmail.com>
[not found] ` <CAFtzXzO7+7nO0XF0xDWktoApobNwVyHSg_1q6Z2hmeLc6czf4w@mail.gmail.com>
[not found] ` <CAFtzXzMBqiHBhusVx651nm1xH+XvacLKeuDDZ-iaMzx7FawyhA@mail.gmail.com>
2017-05-12 18:18 ` Fwd: " Manolis Ragkousis
2017-05-13 7:06 ` Ricardo Wurmus
2017-05-12 18:04 ` Leo Famulari
2017-05-12 21:04 ` ng0
2017-05-13 13:59 ` Ludovic Courtès
2017-05-13 14:20 ` Vincent Legoll
2017-05-14 19:14 ` Leo Famulari
2017-05-14 20:19 ` Leo Famulari
2017-05-15 1:52 ` Leo Famulari
2017-05-15 12:44 ` Ludovic Courtès
2017-05-16 14:41 ` sirgazil
2017-05-16 18:17 ` Leo Famulari
2017-05-16 18:19 ` Leo Famulari
2017-05-17 0:51 ` sirgazil
2017-05-17 3:02 ` Leo Famulari
2017-05-17 8:29 ` Ludovic Courtès
2017-05-16 17:12 ` Alex Kost
2017-05-16 23:03 ` Leo Famulari [this message]
2017-05-17 12:38 ` Ludovic Courtès
2017-05-17 18:20 ` Leo Famulari
2017-05-22 11:49 ` Building the web site Ludovic Courtès
2017-05-21 13:04 ` Planning for the next release Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170516230335.GA21926@jasmine \
--to=leo@famulari.name \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).